* TMessageBox is a system-modal dialog with buttons for OK, Cancel, Yes, or
* No. Call it like:
*
- * <p>
* <pre>
* {@code
* box = application.messageBox(title, caption,
*/
private static final ResourceBundle i18n = ResourceBundle.getBundle(TMessageBox.class.getName());
+ // ------------------------------------------------------------------------
+ // Constants --------------------------------------------------------------
+ // ------------------------------------------------------------------------
+
/**
* Message boxes have these supported types.
*/
YESNOCANCEL
};
- /**
- * The type of this message box.
- */
- private Type type;
-
- /**
- * My buttons.
- */
- private List<TButton> buttons;
-
/**
* Message boxes have these possible results.
*/
NO
};
+ // ------------------------------------------------------------------------
+ // Variables --------------------------------------------------------------
+ // ------------------------------------------------------------------------
+
+ /**
+ * The type of this message box.
+ */
+ private Type type;
+
+ /**
+ * My buttons.
+ */
+ private List<TButton> buttons;
+
/**
* Which button was clicked: OK, CANCEL, YES, or NO.
*/
return result;
}
+ // ------------------------------------------------------------------------
+ // Constructors -----------------------------------------------------------
+ // ------------------------------------------------------------------------
+
/**
* Public constructor. The message box will be centered on screen.
*
}
}
+ // ------------------------------------------------------------------------
+ // TWindow ----------------------------------------------------------------
+ // ------------------------------------------------------------------------
+
/**
* Handle keystrokes.
*
break;
default:
- throw new IllegalArgumentException("Invalid message box type: " + type);
+ throw new IllegalArgumentException("Invalid message box type: " +
+ type);
}
super.onKeypress(keypress);