org.gnu.gtk

Class MessageDialog

public class MessageDialog extends Dialog

MessageDialog presents a dialog with an image representing the type of message (Error, Question, etc.) alongside some message text. It's simply a convenience widget; you could construct the equivalent of MessageDialog from Dialog without too much effort, but MessageDialog saves typing.

The easiest way to do a modal message dialog is to use MessageDialog.

Constructor Summary
MessageDialog(Window parent, DialogFlags flags, MessageType type, ButtonsType buttons, String message, boolean hasMarkup)
Construct a new MessageDialog.
MessageDialog(Handle handle)
Construct a MessageDialog using a handle to a native resource.
Method Summary
static MessageDialoggetMessageDialog(Handle handle)
Internal static factory method to be used by Java-Gnome only.
static TypegetType()
Retrieve the runtime type used by the GLib library.
voidsetMarkup(String markup)
Sets the text of the message dialog to be markup, which is marked up with the Pango text markup language.
voidsetSecondaryMarkup(String markup)
Sets the secondary text of the message dialog to be markup, which is marked up with the Pango text markup language.
voidsetSecondaryText(String text)
Sets the secondary text of the message dialog to be text.

Constructor Detail

MessageDialog

public MessageDialog(Window parent, DialogFlags flags, MessageType type, ButtonsType buttons, String message, boolean hasMarkup)
Construct a new MessageDialog.

Parameters: parent The parent Window of this MessageDialog. flags Provides initialization information for the Dialog. type The type of message to display. buttons What type of buttons should be on this dialog. message The message to display. hasMarkup Does the message String contain markup?

See Also: MessageType

MessageDialog

public MessageDialog(Handle handle)
Construct a MessageDialog using a handle to a native resource.

Method Detail

getMessageDialog

public static MessageDialog getMessageDialog(Handle handle)
Internal static factory method to be used by Java-Gnome only.

getType

public static Type getType()
Retrieve the runtime type used by the GLib library.

setMarkup

public void setMarkup(String markup)
Sets the text of the message dialog to be markup, which is marked up with the Pango text markup language.

Parameters: markup The markup string.

setSecondaryMarkup

public void setSecondaryMarkup(String markup)
Sets the secondary text of the message dialog to be markup, which is marked up with the Pango text markup language.

Note that setting a secondary text makes the primary text become bold, unless you have provided explicit markup.

Since: 2.6

setSecondaryText

public void setSecondaryText(String text)
Sets the secondary text of the message dialog to be text.

Note that setting a secondary text makes the primary text become bold, unless you have provided explicit markup.

Since: 2.6