|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.salespointframework.desktop.formsheets.MessageForm
public class MessageForm
The MessageForm class displays confirmation, information, ... dialogs like the JOptionPane
in SalesPoint style and uses the PreferenceStorage
to save decisions made by the user, if selected.
MessageForm supports:
Types: Informations, Questions, Warnings and Errors as type
Button configurations: Ok, Yes/No, Ok/Abort, Yes/No/Abort
Nested Class Summary | |
---|---|
static class |
MessageForm.MessageFormIcon
Icons available for MessageForm |
static class |
MessageForm.MessageFormResult
Possible results of show() |
static class |
MessageForm.MessageFormSheet
FormSheet for MessageForm |
static class |
MessageForm.MessageFormSheetContentCreator
FormSheetContentCreator for MessageForm |
static class |
MessageForm.MessageFormType
This enumeration contains the possible types for MessageForm |
Field Summary | |
---|---|
private static java.lang.String |
BUTTON_LABEL_ABORT
Text on Abort button |
private static java.lang.String |
BUTTON_LABEL_NO
text on No Button |
private static java.lang.String |
BUTTON_LABEL_OK
Text on Ok button |
private static java.lang.String |
BUTTON_LABEL_YES
Text on Yes button |
private java.lang.String |
caption
Dialog caption |
private MessageForm.MessageFormIcon |
icon
Icon to display |
private java.awt.Window |
owner
JFrame that owns the dialog |
private java.lang.String |
preferenceKey
Key in which user decision should be stored |
private static java.lang.String |
savePreferenceLabel
Label near the "remember" checkbox |
private java.lang.String |
text
text to display |
private MessageForm.MessageFormType |
type
Type of MessageForm |
Constructor Summary | |
---|---|
MessageForm(java.awt.Window owner,
java.lang.String caption,
java.lang.String text,
MessageForm.MessageFormType type,
MessageForm.MessageFormIcon icon,
java.lang.String preferenceKey)
Compose a MessageForm |
Method Summary | |
---|---|
private java.awt.Rectangle |
calculateDefaultBounds()
Calculates the default dialog size an position |
static javax.swing.Icon |
getIcon(MessageForm.MessageFormIcon icon)
|
static java.lang.String |
getSavePreferenceLabel()
Get the Label text near the remember checkbox |
static void |
setAbortButtonLabel(java.lang.String text)
Replace the default abort button text |
static void |
setNoButtonLabel(java.lang.String text)
Replace the default No button text |
static void |
setOkButtonLabel(java.lang.String text)
Replace the default no button text |
static void |
setSavePreferenceLabel(java.lang.String text)
Replace default text near the remember checkbox |
static void |
setYesButtonLabel(java.lang.String text)
Replace the default yes button text |
MessageForm.MessageFormResult |
show()
Blocking call to display the dialog and await users decision. |
void |
showParallel()
Non Blocking call |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.awt.Window owner
private java.lang.String text
private java.lang.String caption
private MessageForm.MessageFormType type
private MessageForm.MessageFormIcon icon
private java.lang.String preferenceKey
private static java.lang.String savePreferenceLabel
private static java.lang.String BUTTON_LABEL_OK
private static java.lang.String BUTTON_LABEL_YES
private static java.lang.String BUTTON_LABEL_NO
private static java.lang.String BUTTON_LABEL_ABORT
Constructor Detail |
---|
public MessageForm(java.awt.Window owner, java.lang.String caption, java.lang.String text, MessageForm.MessageFormType type, MessageForm.MessageFormIcon icon, java.lang.String preferenceKey)
owner
- the owning JFrame
of the dialogcaption
- of the dialogtext
- to display in the dialogtype
- of dialogicon
- to display on the left side of the textpreferenceKey
- where the user decision should be stored. null, if decision should never be savedMethod Detail |
---|
public static void setSavePreferenceLabel(java.lang.String text)
text
- public static void setAbortButtonLabel(java.lang.String text)
text
- public static void setNoButtonLabel(java.lang.String text)
text
- public static void setYesButtonLabel(java.lang.String text)
text
- public static void setOkButtonLabel(java.lang.String text)
text
- public static java.lang.String getSavePreferenceLabel()
public static javax.swing.Icon getIcon(MessageForm.MessageFormIcon icon)
private java.awt.Rectangle calculateDefaultBounds()
public void showParallel()
public MessageForm.MessageFormResult show()
PreferenceStorage
for the key
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |