org.gnome.gtk
Class WarningMessageDialog
java.lang.Object
org.freedesktop.bindings.Proxy
org.gnome.glib.Object
org.gnome.gtk.Object
org.gnome.gtk.Widget
org.gnome.gtk.Container
org.gnome.gtk.Bin
org.gnome.gtk.Window
org.gnome.gtk.Dialog
org.gnome.gtk.MessageDialog
org.gnome.gtk.WarningMessageDialog
public class WarningMessageDialog
- extends MessageDialog
A Dialog preconfigured to present a cautionary message to the user and to
request confirmation of an action.
Be careful not to overdo it - a Dialog popping up to confirm every last
action is a) really annoying and worse b) will desensitize the user to the
message - they will just start ignoring the Dialog and thus probably miss
the chance to avoid something really important.
This is a modal MessageDialog of type WARNING
with an "Ok" Button for the user to confirm they want to proceed, and a
"Cancel" Button for them to abort the operation.
final Window w;
final Dialog d;
final ResponseType result;
d = new WarningMessageDialog(w, "You are about set off the fire alarm",
"Is that what you really want to do?");
result = d.run();
d.hide();
if (result == ResponseType.OK) {
// do dangerous action
}
- Author:
- Andrew Cowie, Vreixo Formoso
| Nested classes/interfaces inherited from class org.gnome.gtk.Widget |
Widget.BUTTON_PRESS_EVENT, Widget.BUTTON_RELEASE_EVENT, Widget.ENTER_NOTIFY_EVENT, Widget.EXPOSE_EVENT, Widget.FOCUS_IN_EVENT, Widget.FOCUS_OUT_EVENT, Widget.HIDE, Widget.KEY_PRESS_EVENT, Widget.KEY_RELEASE_EVENT, Widget.LEAVE_NOTIFY_EVENT, Widget.UNMAP_EVENT, Widget.VISIBILITY_NOTIFY_EVENT |
| Methods inherited from class org.gnome.gtk.Window |
connect, getHeight, getMaximized, getPositionX, getPositionY, getScreen, getWidth, move, present, setDecorated, setDefaultSize, setFullscreen, setGravity, setIcon, setKeepAbove, setKeepBelow, setMaximize, setModal, setPosition, setResizable, setStick, setTitle, setTransientFor |
| Methods inherited from class org.gnome.gtk.Bin |
getChild |
| Methods inherited from class org.gnome.gtk.Widget |
activate, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, getAllocation, getHasFocus, getParent, getRequisition, getToplevel, getWindow, grabFocus, hide, modifyBackground, modifyText, setCanFocus, setSensitive, setSizeRequest, setTooltipMarkup, setTooltipText, show, showAll |
| Methods inherited from class org.freedesktop.bindings.Proxy |
toString |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
WarningMessageDialog
public WarningMessageDialog(Window parent,
java.lang.String primary,
java.lang.String secondary)