|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--kiwi.ui.dialog.DialogSet
This class is the Kiwi analogy to the Swing JOptionPane. It provides
a simple interface for displaying some of the more commonly-used Kiwi
dialogs without requiring any Dialog
objects to be
instantiated.
Although each instance of DialogSet
may have its own owner
Window
and placement policy, they will all share singleton
instances of KMessageDialog
, KQuestionDialog
, and
KInputDialog
.
A placement policy may be assigned to a DialogSet
; this
policy defines where dialogs will appear relative to their owner
Window
. If there is no owner, dialogs will appear in the
center of the screen.
KMessageDialog
,
KQuestionDialog
,
KInputDialog
Field Summary | |
static int |
CASCADE_PLACEMENT
Placement policy. |
static int |
CENTER_PLACEMENT
Placement policy. |
Constructor Summary | |
DialogSet(Window owner,
int placement)
Construct a new DialogSet with the given owner and
placement policy. |
Method Summary | |
static DialogSet |
getInstance()
Get a reference to the default instance of DialogSet . |
void |
propertyChange(PropertyChangeEvent evt)
Respond to property change events. |
String |
showInputDialog(String prompt)
Show a KInputDialog . |
String |
showInputDialog(String title,
Icon icon,
String prompt)
Show a KInputDialog . |
void |
showMessageDialog(String message)
Show a KMessageDialog . |
void |
showMessageDialog(String title,
Icon icon,
String message)
Show a KMessageDialog . |
boolean |
showQuestionDialog(String prompt)
Show a KQuestionDialog . |
boolean |
showQuestionDialog(String title,
Icon icon,
String prompt)
Show a KQuestionDialog . |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int CENTER_PLACEMENT
Window
.public static final int CASCADE_PLACEMENT
Window
.Constructor Detail |
public DialogSet(Window owner, int placement) throws IllegalArgumentException
DialogSet
with the given owner and
placement policy.owner
- The Window
that is the owner of this
DialogSet
.placement
- The placement for dialogs in this
DialogSet
; one of the numeric constants defined above.Method Detail |
public static DialogSet getInstance()
DialogSet
. This
instance has no owner Window
, and hence its dialogs appear
centered on the screen.public String showInputDialog(String prompt)
KInputDialog
. Displays an input dialog and returns
when the dialog is dismissed.prompt
- The prompt to display in the dialog.public String showInputDialog(String title, Icon icon, String prompt)
KInputDialog
. Displays an input dialog and returns
when the dialog is dismissed.title
- The title for the dialog window.icon
- The icon to display in the dialog.prompt
- The prompt to display in the dialog.public boolean showQuestionDialog(String prompt)
KQuestionDialog
. Displays a question dialog and
returns when the dialog is dismissed.prompt
- The prompt to display in the dialog.public boolean showQuestionDialog(String title, Icon icon, String prompt)
KQuestionDialog
. Displays a question dialog and
returns when the dialog is dismissed.title
- The title for the dialog window.icon
- The icon to display in the dialog.prompt
- The promopt to display in the dialog.public void showMessageDialog(String message)
KMessageDialog
. Displays a message dialog and returns
when the dialog is dismissed.prompt
- The prompt to display in the dialog.public void showMessageDialog(String title, Icon icon, String message)
KMessageDialog
. Displays a message dialog and returns
when the dialog is dismissed.title
- The title for the dialog window.icon
- The icon to display in the dialog.prompt
- The prompt to display in the dialog.public void propertyChange(PropertyChangeEvent evt)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |