|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
org.tentackle.ui.FormDialog
org.tentackle.appworx.CancelSaveDiscardDialog
public class CancelSaveDiscardDialog
A dialog to prompt the user for cancel, save or discard.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JDialog |
|---|
JDialog.AccessibleJDialog |
| Nested classes/interfaces inherited from class java.awt.Dialog |
|---|
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
Window.AccessibleAWTWindow |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static int |
CANCEL
return code for "cancel" |
static int |
DISCARD
return code for "discard" |
static String |
discardKeys
key codes for "discard" |
static int |
SAVE
return code for "save" |
static String |
saveKeys
key codes for "save" |
| Fields inherited from class javax.swing.JDialog |
|---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Dialog |
|---|
DEFAULT_MODALITY_TYPE |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
CancelSaveDiscardDialog()
|
|
| Method Summary | |
|---|---|
static int |
getAnswer()
Creates the default "data has been modified"-dialog and waits for user's answer. |
static int |
getAnswer(String question)
Creates a question dialog and waits for user's answer. |
static int |
getAnswer(String question,
String discard,
String save,
String cancel)
Creates a question dialog and waits for user's answer. |
Component |
getMessageComponent()
Gets the message component. |
void |
setMessageComponent(Component comp)
Replaces the default center panel with some other Component. |
int |
showDialog()
Shows the modal dialog and returns the user's answer. If setMessageComponent(java.awt.Component) is used. |
int |
showDialog(String question,
String discard,
String save,
String cancel)
Shows the modal dialog and returns the user's answer. |
| Methods inherited from class java.awt.Dialog |
|---|
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated, setVisible, show, toBack |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.tentackle.ui.FormContainer |
|---|
getTitle, setTitle |
| Field Detail |
|---|
public static String saveKeys
public static String discardKeys
public static final int CANCEL
public static final int SAVE
public static final int DISCARD
| Constructor Detail |
|---|
public CancelSaveDiscardDialog()
| Method Detail |
|---|
public static int getAnswer(String question,
String discard,
String save,
String cancel)
question - the question textdiscard - the text of the discard button, null if defaultsave - the text of the save button, null if defaultcancel - the text of the cancel button, null if default
CANCEL, SAVE or DISCARDpublic static int getAnswer(String question)
question - the question text
CANCEL, SAVE or DISCARDpublic static int getAnswer()
CANCEL, SAVE or DISCARD
public int showDialog(String question,
String discard,
String save,
String cancel)
question - the question textdiscard - the text of the discard button, null if defaultsave - the text of the save button, null if defaultcancel - the text of the cancel button, null if default
CANCEL, SAVE or DISCARDpublic int showDialog()
setMessageComponent(java.awt.Component) is used.
CANCEL, SAVE or DISCARDpublic void setMessageComponent(Component comp)
comp - the componentpublic Component getMessageComponent()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||