org.salespointframework.desktop.formsheets
Class MessageForm

java.lang.Object
  extended by org.salespointframework.desktop.formsheets.MessageForm

public class MessageForm
extends java.lang.Object

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

Since:
4.0
Author:
Thomas Kissinger

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
 
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
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
 

Constructor Detail

MessageForm

public 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

Parameters:
owner - the owning JFrame of the dialog
caption - of the dialog
text - to display in the dialog
type - of dialog
icon - to display on the left side of the text
preferenceKey - where the user decision should be stored. null, if decision should never be saved
Method Detail

setSavePreferenceLabel

public static void setSavePreferenceLabel(java.lang.String text)
Replace default text near the remember checkbox

Parameters:
text -

setAbortButtonLabel

public static void setAbortButtonLabel(java.lang.String text)
Replace the default abort button text

Parameters:
text -

setNoButtonLabel

public static void setNoButtonLabel(java.lang.String text)
Replace the default No button text

Parameters:
text -

setYesButtonLabel

public static void setYesButtonLabel(java.lang.String text)
Replace the default yes button text

Parameters:
text -

setOkButtonLabel

public static void setOkButtonLabel(java.lang.String text)
Replace the default no button text

Parameters:
text -

getSavePreferenceLabel

public static java.lang.String getSavePreferenceLabel()
Get the Label text near the remember checkbox

Returns:

getIcon

public static javax.swing.Icon getIcon(MessageForm.MessageFormIcon icon)

showParallel

public void showParallel()
Non Blocking call


show

public MessageForm.MessageFormResult show()
Blocking call to display the dialog and await users decision. Dialog will not become visible, if a valid result was found in PreferenceStorage for the key

Returns: