|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--moka.lang.Object | +--moka.event.EventListener | +--moka.x.Component | +--moka.x.Container | +--moka.x.Frame | +--moka.x.OptionPane
OptionPane
makes it easy to pop up a standard dialog box that
prompts users for a value or informs them of something.
Field Summary | |
static short |
CANCEL_OPTION
Return value from class method if CANCEL is chosen. |
static short |
DEFAULT_OPTION
Default return value. |
static short |
NO_OPTION
Return value from class method if NO is chosen. |
static short |
OK_CANCEL_OPTION
Type used for showConfirmDialog . |
static short |
OK_OPTION
Return value form class method if OK is chosen. |
static short |
YES_NO_CANCEL_OPTION
Type used for showConfirmDialog . |
static short |
YES_NO_OPTION
Type used for showConfirmDialog . |
static short |
YES_OPTION
Return value from class method if YES is chosen. |
Fields inherited from class moka.x.Frame |
closeButtonVisible, defaultCloseOperation, DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE, minimizeButtonVisible, modal, movable |
Fields inherited from class moka.x.Container |
child, tail |
Fields inherited from class moka.x.Component |
enabled, height, listen, mnemonic, next, parent, prev, visible, width, x, y |
Fields inherited from interface moka.x.Captioned |
caption, font |
Constructor Summary | |
OptionPane()
Constructs a newly allocated OptionPane dialog. |
Method Summary | |
static void |
cleanup()
Called at the end of the program to free the ressources used by the static members of this class. |
void |
eventTriggered(java.lang.Object sender)
Invoked when an event is triggered. |
static short |
showConfirmDialog(moka.x.Container parent,
java.lang.String title,
java.lang.String message,
short option)
Brings up a dialog with the specified options (a combination of Yes, No and Cancel); with the specified title. |
static short |
showConfirmDialog(java.lang.String message)
Brings up a dialog with the options Yes, No and Cancel; with the title, Select an Option. |
static java.lang.String |
showInputDialog(moka.x.Container parent,
java.lang.String title,
java.lang.String message)
Shows a question-message dialog requesting input from the user. |
static java.lang.String |
showInputDialog(java.lang.String message)
Shows a question-message dialog requesting input from the user. |
static void |
showMessageDialog(moka.x.Container parent,
java.lang.String title,
java.lang.String message)
Brings up an information-message dialog. |
static void |
showMessageDialog(java.lang.String message)
Brings up an information-message dialog titled "Message". |
Methods inherited from class moka.x.Frame |
dispose, finalize, isCursorOver, isCursorOverCloseButton, isCursorOverMinimizeButton, isCursorOverTitleBar, onClose, onDrag, onMinimize, paint, paintForeground, setCloseButtonVisible, setMinimizeButtonVisible, setModal, setVisible, use |
Methods inherited from class moka.x.Container |
add, checkMnemonic, clean, empty, onPaint, onRefresh, paintChildren, remove, repaintChildren, toFront |
Methods inherited from class moka.x.Component |
bottom, center, left, move, right, setBounds, setEnabled, setHeight, setMnemonic, setWidth, setX, setY, top |
Methods inherited from class moka.event.EventListener |
eventTriggered |
Methods inherited from class moka.lang.Object |
equals, getClassName, toString |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface moka.x.Captioned |
setCaption, setFont |
Field Detail |
public static final short YES_NO_OPTION
showConfirmDialog
.
public static final short YES_NO_CANCEL_OPTION
showConfirmDialog
.
public static final short OK_CANCEL_OPTION
showConfirmDialog
.
public static final short DEFAULT_OPTION
public static final short YES_OPTION
public static final short NO_OPTION
public static final short CANCEL_OPTION
public static final short OK_OPTION
Constructor Detail |
public OptionPane()
Method Detail |
public static void cleanup()
public static void showMessageDialog(java.lang.String message)
message
- The information-message to be displayed.public static void showMessageDialog(moka.x.Container parent, java.lang.String title, java.lang.String message)
parent
- The parent of the dialog.title
- The title of the dialog.message
- The information-message to be displayed.public static java.lang.String showInputDialog(java.lang.String message)
message
- The question-message to be displayed.public static java.lang.String showInputDialog(moka.x.Container parent, java.lang.String title, java.lang.String message)
parent
- The parent of the dialog.title
- The title of the dialog.message
- The question-message to be displayed.public static short showConfirmDialog(java.lang.String message)
message
- The message to be displayed.public static short showConfirmDialog(moka.x.Container parent, java.lang.String title, java.lang.String message, short option)
parent
- The parent of the dialog.title
- The title of the dialog.message
- The message to be displayed.option
- The options to be displayed.public void eventTriggered(java.lang.Object sender)
eventTriggered
in class Component
sender
- The object who triggered the event.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |