org.PingOO.DLAI.lib.PWidget
Class POptionPane

java.lang.Object
  |
  +--org.PingOO.DLAI.lib.PWidget.POptionPane

public class POptionPane
extends java.lang.Object

This class is designed to carry the error messages or warnings on screen as an internal frame or as a frame.
It is based on JDialog and JOptionPane, but works in an internal frame or in a frame and is localizable.

As an internal frame it uses PInternalDialog, the blocking algorithm is dependant from the one defined in PInternalDialog, so in case of non-blocking problem, the class PInternalDialog should be checked first.

As a frame it uses PExternalDialog, the blocking algorithm is dependant from the one defined in PExternalDialog, so in case of non-blocking problem, the class PExternalDialog should be checked first.

If you indend to do a loop on this window's result, you should check POptionPane.UNKNOWN_RESULT in case no button has been chosen (eg : when the window is killed by the user) to avoid blocking your program.

As for the original JDialog class this one is intended to be highly configurable in future.

Since:
PingOO 2.0
Version:
2.0
Author:
Fabrice Bouyé (bouye@cur-archamps.fr)
See Also:
PExternalDialog, PInternalDialog, javax.swing.JOptionPane, javax.swing.JDialog

Inner Class Summary
private  class POptionPane.DialogInternalFrameListener
          Creates a new listener for the dialog window.
private  class POptionPane.DialogWindowListener
          Creates a new listener for the dialog window.
private  class POptionPane.InsidePanel
          The inner panel of the box for internal frames.
private  class POptionPane.ParentInternalFrameListener
          Creates a new listener for the parent window.
private  class POptionPane.ParentWindowListener
          Creates a new listener for the parent window.
 
Field Summary
private static int BAD_RESULT
          Indicates that no button button has been chosen.
private static javax.swing.Icon[] BIG_ICONS
          Contains all the big icons that can be used for displaying in the message.
static int CANCEL_RESULT
          Indicates the "Cancel" button has been chosen.
static int DEFAULT_OPTION
          Puts only the "Ok" Button.
protected  java.awt.Container dialog
          The component in which will reside this option pane.
private  javax.swing.event.InternalFrameListener dialogInternalFrameListener
           
private  java.awt.event.WindowListener dialogWindowListener
           
protected  int displayMode
          The default display mode for this box.
static int ERROR_MESSAGE
          Indicates an error message.
static int EXTERNAL_OPTION_PANE
          Displays the mesage in a stand alone frame.
static int INFORMATION_MESSAGE
          Indicates an information message.
protected  PInputPanel inPanel
          The inside panel included in this popup window.
static int INTERNAL_OPTION_PANE
          Displays the message in a internal frame.
protected  java.lang.String module
          Defines the module where to find this component's text and tool tip.
static int NO_RESULT
          Indicates the "No" button has been chosen.
static int OK_CANCEL_OPTION
          Puts the "Ok" and "Cancel" Buttons.
static int OK_OPTION
          Puts only the "Ok" Button.
static int OK_RESULT
          Indicates the "Ok" button has been chosen.
protected  int option
          The default option for this box.
private  java.awt.Container parent
          The parent of this option pane.
private  javax.swing.event.InternalFrameListener parentInternalFrameListener
           
private  java.awt.event.WindowListener parentWindowListener
           
static int PLAIN_MESSAGE
          Indicates a message.
static int QUESTION_MESSAGE
          Indicates a question.
protected  int result
          The default result, makes the loop active.
private static javax.swing.Icon[] SMALL_ICONS
          Contains all the small icons that can be used for the window title.
private static java.lang.String[] TITLE_KEYS
          Contains all the keys need to retrieve the title of the window.
protected  int type
          The default type for this box.
static int UNKNOWN_RESULT
          Indicates that no button button has been chosen when exiting.
static int WARNING_MESSAGE
          Indicates a warning.
static int YES_NO_CANCEL_OPTION
          Puts the "Yes", "No" and "Cancel" Buttons.
static int YES_NO_OPTION
          Puts the "Yes" and "No" Buttons.
static int YES_RESULT
          Indicates the "Yes" button has been chosen.
 
Constructor Summary
private POptionPane(javax.swing.JComponent component, java.lang.String module, java.awt.Container parent, int type, javax.swing.Icon icon, int option)
          Creates a new instance.
private POptionPane(javax.swing.JComponent component, java.lang.String module, java.awt.Container parent, int type, javax.swing.Icon icon, int option, boolean allowIcon)
          Creates a new instance.
private POptionPane(javax.swing.JComponent component, java.lang.String module, java.awt.Container parent, int type, java.lang.String titleKey, javax.swing.Icon icon, int option, boolean allowIcon)
          Creates a new instance.
private POptionPane(javax.swing.JComponent component, java.lang.String module, java.awt.Container parent, int type, java.lang.String titleKey, javax.swing.Icon icon, int option, boolean allowIcon, int displayMode)
          Creates a new instance.
 
Method Summary
 javax.swing.Icon getIcon()
          Returns the default icon for this option pane's type.
 void pack()
          Packs the option pane's window.
 void setLocationRelativeTo(java.awt.Container parent)
          Sets the location of this option pane on screen.
 void setResizable(boolean value)
          Allow to resize the option pane's window.
 void setVisible(boolean value)
          Shows or hides this option pane.
 void show()
          Shows the option pane.
static int showExternalConfirmationDialog(java.lang.String message, java.awt.Container parent)
          Creates a confirmation dialog with YES and NO buttons within a frame.
static int showExternalConfirmationDialog(java.lang.String message, java.awt.Container parent, java.lang.String module)
          Creates a confirmation dialog with YES and NO buttons within a frame.
static int showExternalErrorDialog(java.lang.String message, java.awt.Container parent)
          Creates an error dialog with an OK button within a frame.
static int showExternalErrorDialog(java.lang.String message, java.awt.Container parent, java.lang.String module)
          Creates an error dialog with an OK button within a frame.
static int showExternalInformationDialog(java.lang.String message, java.awt.Container parent)
          Creates an information dialog with an OK button within a frame.
static int showExternalInformationDialog(java.lang.String message, java.awt.Container parent, java.lang.String module)
          Creates an information dialog with an OK button within a frame.
static int showExternalMessageDialog(java.lang.String message, java.awt.Container parent)
          Creates a message dialog with an OK button within a frame.
static int showExternalMessageDialog(java.lang.String message, java.awt.Container parent, java.lang.String module)
          Creates a message dialog with an OK button within a frame.
static int showExternalWarningDialog(java.lang.String message, java.awt.Container parent)
          Creates a warning dialog with an OK button within a frame.
static int showExternalWarningDialog(java.lang.String message, java.awt.Container parent, java.lang.String module)
          Creates a warning dialog with an OK button within a frame.
static int showInternalConfirmationDialog(java.lang.String message, java.awt.Container parent)
          Creates a confirmation dialog with YES and NO buttons within an internal frame.
static int showInternalConfirmationDialog(java.lang.String message, java.awt.Container parent, java.lang.String module)
          Creates a confirmation dialog with YES and NO buttons within an internal frame.
static int showInternalErrorDialog(java.lang.String message, java.awt.Container parent)
          Creates an error dialog with an OK button within an internal frame.
static int showInternalErrorDialog(java.lang.String message, java.awt.Container parent, java.lang.String module)
          Creates an error dialog with an OK button within an internal frame.
static int showInternalInformationDialog(java.lang.String message, java.awt.Container parent)
          Creates an information dialog with an OK button within an internal frame.
static int showInternalInformationDialog(java.lang.String message, java.awt.Container parent, java.lang.String module)
          Creates an information dialog with an OK button within an internal frame.
static int showInternalMessageDialog(java.lang.String message, java.awt.Container parent)
          Creates a message dialog with an OK button within an internal frame.
static int showInternalMessageDialog(java.lang.String message, java.awt.Container parent, java.lang.String module)
          Creates a message dialog with an OK button within an internal frame.
static int showInternalWarningDialog(java.lang.String message, java.awt.Container parent)
          Creates a warning dialog with an OK button within an internal frame.
static int showInternalWarningDialog(java.lang.String message, java.awt.Container parent, java.lang.String module)
          Creates a warning dialog with an OK button within an internal frame.
static int showPExternalOptionPane(javax.swing.JComponent component, java.awt.Container parent, int type, javax.swing.Icon icon, int option)
          Creates a new option pane as a frame.
static int showPExternalOptionPane(javax.swing.JComponent component, java.lang.String module, java.awt.Container parent, int type, javax.swing.Icon icon, int option)
          Creates a new option pane as a frame.
static int showPExternalOptionPane(javax.swing.JComponent component, java.lang.String module, java.awt.Container parent, int type, javax.swing.Icon icon, int option, boolean allowIcon)
          Creates a new option pane as a frame.
static int showPExternalOptionPane(javax.swing.JComponent component, java.lang.String module, java.awt.Container parent, int type, java.lang.String titleKey, javax.swing.Icon icon, int option, boolean allowIcon)
          Creates a new option pane as a frame.
static int showPExternalOptionPane(java.lang.String message, java.awt.Container parent, int type, javax.swing.Icon icon, int option)
          Creates a new option pane as a frame.
static int showPExternalOptionPane(java.lang.String message, java.lang.String module, java.awt.Container parent, int type, javax.swing.Icon icon, int option)
          Creates a new option pane as a frame.
static int showPExternalOptionPane(java.lang.String message, java.lang.String module, java.awt.Container parent, int type, java.lang.String titleKey, javax.swing.Icon icon, int option)
          Creates a new option pane as a frame.
static int showPExternalOptionPane(java.lang.String message, java.lang.String module, java.awt.Container parent, int type, java.lang.String titleKey, javax.swing.Icon icon, int option, boolean allowIcon)
          Creates a new option pane as a frame.
static int showPInternalOptionPane(javax.swing.JComponent component, java.awt.Container parent, int type, javax.swing.Icon icon, int option)
          Creates a new option pane as an internal frame.
static int showPInternalOptionPane(javax.swing.JComponent component, java.lang.String module, java.awt.Container parent, int type, javax.swing.Icon icon, int option)
          Creates a new option pane as an internal frame.
static int showPInternalOptionPane(javax.swing.JComponent component, java.lang.String module, java.awt.Container parent, int type, javax.swing.Icon icon, int option, boolean allowIcon)
          Creates a new option pane as an internal frame.
static int showPInternalOptionPane(javax.swing.JComponent component, java.lang.String module, java.awt.Container parent, int type, java.lang.String titleKey, javax.swing.Icon icon, int option, boolean allowIcon)
          Creates a new option pane as an internal frame.
static int showPInternalOptionPane(java.lang.String message, java.awt.Container parent, int type, javax.swing.Icon icon, int option)
          Creates a new option pane as an internal frame.
static int showPInternalOptionPane(java.lang.String message, java.lang.String module, java.awt.Container parent, int type, javax.swing.Icon icon, int option)
          Creates a new option pane as an internal frame.
static int showPInternalOptionPane(java.lang.String message, java.lang.String module, java.awt.Container parent, int type, java.lang.String titleKey, javax.swing.Icon icon, int option)
          Creates a new option pane as an internal frame.
static int showPInternalOptionPane(java.lang.String message, java.lang.String module, java.awt.Container parent, int type, java.lang.String titleKey, javax.swing.Icon icon, int option, boolean allowIcon)
          Creates a new option pane as an internal frame.
static int showPOptionPane(javax.swing.JComponent component, java.lang.String module, java.awt.Container parent, int type, java.lang.String titleKey, javax.swing.Icon icon, int option, boolean allowIcon, int displayMode)
          Shows a blocking dialog box.
 void startModalP()
          Starts blocking user input on the parent component.
 void stopModalP()
          Resumes user input on the parent component.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

INTERNAL_OPTION_PANE

public static final int INTERNAL_OPTION_PANE
Displays the message in a internal frame.
This is the default display mode.

EXTERNAL_OPTION_PANE

public static final int EXTERNAL_OPTION_PANE
Displays the mesage in a stand alone frame.

ERROR_MESSAGE

public static final int ERROR_MESSAGE
Indicates an error message.

INFORMATION_MESSAGE

public static final int INFORMATION_MESSAGE
Indicates an information message.

WARNING_MESSAGE

public static final int WARNING_MESSAGE
Indicates a warning.

QUESTION_MESSAGE

public static final int QUESTION_MESSAGE
Indicates a question.

PLAIN_MESSAGE

public static final int PLAIN_MESSAGE
Indicates a message.

DEFAULT_OPTION

public static final int DEFAULT_OPTION
Puts only the "Ok" Button.
This is the default type.

OK_OPTION

public static final int OK_OPTION
Puts only the "Ok" Button.

YES_NO_OPTION

public static final int YES_NO_OPTION
Puts the "Yes" and "No" Buttons.

YES_NO_CANCEL_OPTION

public static final int YES_NO_CANCEL_OPTION
Puts the "Yes", "No" and "Cancel" Buttons.

OK_CANCEL_OPTION

public static final int OK_CANCEL_OPTION
Puts the "Ok" and "Cancel" Buttons.

BAD_RESULT

private static final int BAD_RESULT
Indicates that no button button has been chosen.
Used for internal show loop.

UNKNOWN_RESULT

public static final int UNKNOWN_RESULT
Indicates that no button button has been chosen when exiting.
This result may be returned if the dialog is closed wihout clicking on a button.

OK_RESULT

public static final int OK_RESULT
Indicates the "Ok" button has been chosen.

YES_RESULT

public static final int YES_RESULT
Indicates the "Yes" button has been chosen.

NO_RESULT

public static final int NO_RESULT
Indicates the "No" button has been chosen.

CANCEL_RESULT

public static final int CANCEL_RESULT
Indicates the "Cancel" button has been chosen.

TITLE_KEYS

private static final java.lang.String[] TITLE_KEYS
Contains all the keys need to retrieve the title of the window.

BIG_ICONS

private static final javax.swing.Icon[] BIG_ICONS
Contains all the big icons that can be used for displaying in the message.
This is a data cache.

SMALL_ICONS

private static final javax.swing.Icon[] SMALL_ICONS
Contains all the small icons that can be used for the window title.
This is a data cache.

inPanel

protected PInputPanel inPanel
The inside panel included in this popup window.

dialog

protected java.awt.Container dialog
The component in which will reside this option pane.

dialogWindowListener

private java.awt.event.WindowListener dialogWindowListener

dialogInternalFrameListener

private javax.swing.event.InternalFrameListener dialogInternalFrameListener

parent

private java.awt.Container parent
The parent of this option pane.

parentWindowListener

private java.awt.event.WindowListener parentWindowListener

parentInternalFrameListener

private javax.swing.event.InternalFrameListener parentInternalFrameListener

displayMode

protected int displayMode
The default display mode for this box.

type

protected int type
The default type for this box.

option

protected int option
The default option for this box.

result

protected int result
The default result, makes the loop active.

module

protected java.lang.String module
Defines the module where to find this component's text and tool tip.
Constructor Detail

POptionPane

private POptionPane(javax.swing.JComponent component,
                    java.lang.String module,
                    java.awt.Container parent,
                    int type,
                    javax.swing.Icon icon,
                    int option)
Creates a new instance.
Parameters:
component - The component to add inside this option pane.
module - The module of this option pane.
parent - The parent of this pane, used to block the parent's window.
type - The type of this option pane see ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE or PLAIN_MESSAGE.
icon - The icon to use, or null when using the default icon.
option - The option of this pane : DEFAULT_OPTION, OK_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.

POptionPane

private POptionPane(javax.swing.JComponent component,
                    java.lang.String module,
                    java.awt.Container parent,
                    int type,
                    javax.swing.Icon icon,
                    int option,
                    boolean allowIcon)
Creates a new instance.
Parameters:
component - The component to add inside this option pane.
module - The module of this option pane.
parent - The parent of this pane, used to block the parent's window.
type - The type of this option pane see ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE or PLAIN_MESSAGE.
icon - The icon to use, or null when using the default icon.
option - The option of this pane : DEFAULT_OPTION, OK_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.
allowIcon - if true an icon will be displayed on the left side of the component.

POptionPane

private POptionPane(javax.swing.JComponent component,
                    java.lang.String module,
                    java.awt.Container parent,
                    int type,
                    java.lang.String titleKey,
                    javax.swing.Icon icon,
                    int option,
                    boolean allowIcon)
Creates a new instance.
Parameters:
component - The component to add inside this option pane.
module - The module of this option pane.
parent - The parent of this pane, used to block the parent's window.
titleKey - The localized title of this option pane.
type - The type of this option pane see ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE or PLAIN_MESSAGE.
icon - The icon to use, or null when using the default icon.
option - The option of this pane : DEFAULT_OPTION, OK_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.
allowIcon - if true an icon will be displayed on the left side of the component.

POptionPane

private POptionPane(javax.swing.JComponent component,
                    java.lang.String module,
                    java.awt.Container parent,
                    int type,
                    java.lang.String titleKey,
                    javax.swing.Icon icon,
                    int option,
                    boolean allowIcon,
                    int displayMode)
Creates a new instance.
Parameters:
component - The component to add inside this option pane.
module - The module of this option pane.
parent - The parent of this pane, used to block the parent's window.
titleKey - The localized title of this option pane.
type - The type of this option pane see ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE or PLAIN_MESSAGE.
icon - The icon to use, or null when using the default icon.
option - The option of this pane : DEFAULT_OPTION, OK_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.
allowIcon - if true an icon will be displayed on the left side of the component.
displayMode - The mode used to display this option pane : INTERNAL_OPTION_PANE or EXTERNAL_OPTION_PANE.
Method Detail

getIcon

public final javax.swing.Icon getIcon()
Returns the default icon for this option pane's type.
Returns:
An icon.

setVisible

public final void setVisible(boolean value)
Shows or hides this option pane.
Parameters:
value - If true make this option pane's window visible, otherwise hides it.

setResizable

public final void setResizable(boolean value)
Allow to resize the option pane's window.
Parameters:
value - If true the option pane's window will be resizable.

show

public final void show()
Shows the option pane.
Same as setVisible(true).

pack

public final void pack()
Packs the option pane's window.

setLocationRelativeTo

public final void setLocationRelativeTo(java.awt.Container parent)
Sets the location of this option pane on screen.
Parameters:
parent - The parent used to center this option pane.

startModalP

public final void startModalP()
Starts blocking user input on the parent component.

stopModalP

public final void stopModalP()
Resumes user input on the parent component.

showPInternalOptionPane

public static final int showPInternalOptionPane(javax.swing.JComponent component,
                                                java.awt.Container parent,
                                                int type,
                                                javax.swing.Icon icon,
                                                int option)
Creates a new option pane as an internal frame.
Parameters:
component - The component to add inside this option pane.
parent - The parent of this pane, used to block the parent's window.
type - The type of this option pane see ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE or PLAIN_MESSAGE.
icon - The icon to use, or null when using the default icon.
option - The option of this pane : DEFAULT_OPTION, OK_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.
Returns:
Depending of the used type : UNKNOWN_RESULT, OK_RESULT, YES_RESULT, NO_RESULT or CANCEL_RESULT.

showPInternalOptionPane

public static final int showPInternalOptionPane(javax.swing.JComponent component,
                                                java.lang.String module,
                                                java.awt.Container parent,
                                                int type,
                                                javax.swing.Icon icon,
                                                int option)
Creates a new option pane as an internal frame.
Parameters:
component - The component to add inside this option pane.
module - The module of this option pane.
parent - The parent of this pane, used to block the parent's window.
type - The type of this option pane see ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE or PLAIN_MESSAGE.
icon - The icon to use, or null when using the default icon.
option - The option of this pane : DEFAULT_OPTION, OK_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.
Returns:
Depending of the used type : UNKNOWN_RESULT, OK_RESULT, YES_RESULT, NO_RESULT or CANCEL_RESULT.

showPInternalOptionPane

public static final int showPInternalOptionPane(javax.swing.JComponent component,
                                                java.lang.String module,
                                                java.awt.Container parent,
                                                int type,
                                                javax.swing.Icon icon,
                                                int option,
                                                boolean allowIcon)
Creates a new option pane as an internal frame.
Parameters:
component - The component to add inside this option pane.
module - The module of this option pane.
parent - The parent of this pane, used to block the parent's window.
type - The type of this option pane see ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE or PLAIN_MESSAGE.
icon - The icon to use, or null when using the default icon.
option - The option of this pane : DEFAULT_OPTION, OK_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.
allowIcon - if true an icon will be displayed on the left side of the component.
Returns:
Depending of the used type : UNKNOWN_RESULT, OK_RESULT, YES_RESULT, NO_RESULT or CANCEL_RESULT.

showPInternalOptionPane

public static final int showPInternalOptionPane(javax.swing.JComponent component,
                                                java.lang.String module,
                                                java.awt.Container parent,
                                                int type,
                                                java.lang.String titleKey,
                                                javax.swing.Icon icon,
                                                int option,
                                                boolean allowIcon)
Creates a new option pane as an internal frame.
Parameters:
component - The component to add inside this option pane.
module - The module of this option pane.
parent - The parent of this pane, used to block the parent's window.
type - The type of this option pane see ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE or PLAIN_MESSAGE.
titleKey - The localized title of this option pane.
icon - The icon to use, or null when using the default icon.
option - The option of this pane : DEFAULT_OPTION, OK_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.
allowIcon - if true an icon will be displayed on the left side of the component.
Returns:
Depending of the used type : UNKNOWN_RESULT, OK_RESULT, YES_RESULT, NO_RESULT or CANCEL_RESULT.

showPInternalOptionPane

public static final int showPInternalOptionPane(java.lang.String message,
                                                java.awt.Container parent,
                                                int type,
                                                javax.swing.Icon icon,
                                                int option)
Creates a new option pane as an internal frame.
Parameters:
message - The message to show inside this option pane.
parent - The parent of this pane, used to block the parent's window.
type - The type of this option pane see ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE or PLAIN_MESSAGE.
icon - The icon to use, or null when using the default icon.
option - The option of this pane : DEFAULT_OPTION, OK_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.
Returns:
Depending of the used type : UNKNOWN_RESULT, OK_RESULT, YES_RESULT, NO_RESULT or CANCEL_RESULT.

showPInternalOptionPane

public static final int showPInternalOptionPane(java.lang.String message,
                                                java.lang.String module,
                                                java.awt.Container parent,
                                                int type,
                                                javax.swing.Icon icon,
                                                int option)
Creates a new option pane as an internal frame.
Parameters:
message - The message to show inside this option pane.
module - The module of this option pane.
parent - The parent of this pane, used to block the parent's window.
type - The type of this option pane see ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE or PLAIN_MESSAGE.
icon - The icon to use, or null when using the default icon.
option - The option of this pane : DEFAULT_OPTION, OK_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.
Returns:
Depending of the used type : UNKNOWN_RESULT, OK_RESULT, YES_RESULT, NO_RESULT or CANCEL_RESULT.

showPInternalOptionPane

public static final int showPInternalOptionPane(java.lang.String message,
                                                java.lang.String module,
                                                java.awt.Container parent,
                                                int type,
                                                java.lang.String titleKey,
                                                javax.swing.Icon icon,
                                                int option)
Creates a new option pane as an internal frame.
Parameters:
message - The message to show inside this option pane.
module - The module of this option pane.
parent - The parent of this pane, used to block the parent's window.
type - The type of this option pane see ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE or PLAIN_MESSAGE.
titleKey - The localized title of this option pane.
icon - The icon to use, or null when using the default icon.
option - The option of this pane : DEFAULT_OPTION, OK_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.
Returns:
Depending of the used type : UNKNOWN_RESULT, OK_RESULT, YES_RESULT, NO_RESULT or CANCEL_RESULT.

showPInternalOptionPane

public static final int showPInternalOptionPane(java.lang.String message,
                                                java.lang.String module,
                                                java.awt.Container parent,
                                                int type,
                                                java.lang.String titleKey,
                                                javax.swing.Icon icon,
                                                int option,
                                                boolean allowIcon)
Creates a new option pane as an internal frame.
Parameters:
message - The message to show inside this option pane.
module - The module of this option pane.
parent - The parent of this pane, used to block the parent's window.
type - The type of this option pane see ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE or PLAIN_MESSAGE.
titleKey - The localized title of this option pane.
icon - The icon to use, or null when using the default icon.
option - The option of this pane : DEFAULT_OPTION, OK_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.
allowIcon - if true an icon will be displayed on the left side of the component.
Returns:
Depending of the used type : UNKNOWN_RESULT, OK_RESULT, YES_RESULT, NO_RESULT or CANCEL_RESULT.

showInternalInformationDialog

public static final int showInternalInformationDialog(java.lang.String message,
                                                      java.awt.Container parent)
Creates an information dialog with an OK button within an internal frame.
Parameters:
message - The message to show inside this option pane.
parent - The parent of this pane, used to block the parent's window.
Returns:
UNKNOWN_RESULT or OK_RESULT.

showInternalInformationDialog

public static final int showInternalInformationDialog(java.lang.String message,
                                                      java.awt.Container parent,
                                                      java.lang.String module)
Creates an information dialog with an OK button within an internal frame.
Parameters:
message - The message to show inside this option pane.
parent - The parent of this pane, used to block the parent's window.
module - The module of this option pane.
Returns:
UNKNOWN_RESULT or OK_RESULT.

showInternalErrorDialog

public static final int showInternalErrorDialog(java.lang.String message,
                                                java.awt.Container parent)
Creates an error dialog with an OK button within an internal frame.
Parameters:
message - The message to show inside this option pane.
parent - The parent of this pane, used to block the parent's window.
Returns:
UNKNOWN_RESULT or OK_RESULT.

showInternalErrorDialog

public static final int showInternalErrorDialog(java.lang.String message,
                                                java.awt.Container parent,
                                                java.lang.String module)
Creates an error dialog with an OK button within an internal frame.
Parameters:
message - The message to show inside this option pane.
parent - The parent of this pane, used to block the parent's window.
module - The module of this option pane.
Returns:
UNKNOWN_RESULT or OK_RESULT.

showInternalConfirmationDialog

public static final int showInternalConfirmationDialog(java.lang.String message,
                                                       java.awt.Container parent)
Creates a confirmation dialog with YES and NO buttons within an internal frame.
Parameters:
message - The message to show inside this option pane.
parent - The parent of this pane, used to block the parent's window.
Returns:
UNKNOWN_RESULT, YES_RESULT or NO_RESULT.

showInternalConfirmationDialog

public static final int showInternalConfirmationDialog(java.lang.String message,
                                                       java.awt.Container parent,
                                                       java.lang.String module)
Creates a confirmation dialog with YES and NO buttons within an internal frame.
Parameters:
message - The message to show inside this option pane.
parent - The parent of this pane, used to block the parent's window.
module - The module of this option pane.
Returns:
UNKNOWN_RESULT, YES_RESULT or NO_RESULT.

showInternalMessageDialog

public static final int showInternalMessageDialog(java.lang.String message,
                                                  java.awt.Container parent)
Creates a message dialog with an OK button within an internal frame.
Parameters:
message - The message to show inside this option pane.
parent - The parent of this pane, used to block the parent's window.
Returns:
UNKNOWN_RESULT or OK_RESULT.

showInternalMessageDialog

public static final int showInternalMessageDialog(java.lang.String message,
                                                  java.awt.Container parent,
                                                  java.lang.String module)
Creates a message dialog with an OK button within an internal frame.
Parameters:
message - The message to show inside this option pane.
parent - The parent of this pane, used to block the parent's window.
module - The module of this option pane.
Returns:
UNKNOWN_RESULT or OK_RESULT.

showInternalWarningDialog

public static final int showInternalWarningDialog(java.lang.String message,
                                                  java.awt.Container parent)
Creates a warning dialog with an OK button within an internal frame.
Parameters:
message - The message to show inside this option pane.
parent - The parent of this pane, used to block the parent's window.
Returns:
UNKNOWN_RESULT or OK_RESULT.

showInternalWarningDialog

public static final int showInternalWarningDialog(java.lang.String message,
                                                  java.awt.Container parent,
                                                  java.lang.String module)
Creates a warning dialog with an OK button within an internal frame.
Parameters:
message - The message to show inside this option pane.
parent - The parent of this pane, used to block the parent's window.
module - The module of this option pane.
Returns:
UNKNOWN_RESULT or OK_RESULT.

showPExternalOptionPane

public static final int showPExternalOptionPane(javax.swing.JComponent component,
                                                java.awt.Container parent,
                                                int type,
                                                javax.swing.Icon icon,
                                                int option)
Creates a new option pane as a frame.
Parameters:
component - The component to add inside this option pane.
parent - The parent of this pane, used to block the parent's window.
type - The type of this option pane see ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE or PLAIN_MESSAGE.
icon - The icon to use, or null when using the default icon.
option - The option of this pane : DEFAULT_OPTION, OK_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.
Returns:
Depending of the used type : UNKNOWN_RESULT, OK_RESULT, YES_RESULT, NO_RESULT or CANCEL_RESULT.

showPExternalOptionPane

public static final int showPExternalOptionPane(javax.swing.JComponent component,
                                                java.lang.String module,
                                                java.awt.Container parent,
                                                int type,
                                                javax.swing.Icon icon,
                                                int option)
Creates a new option pane as a frame.
Parameters:
component - The component to add inside this option pane.
module - The module of this option pane.
parent - The parent of this pane, used to block the parent's window.
type - The type of this option pane see ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE or PLAIN_MESSAGE.
icon - The icon to use, or null when using the default icon.
option - The option of this pane : DEFAULT_OPTION, OK_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.
Returns:
Depending of the used type : UNKNOWN_RESULT, OK_RESULT, YES_RESULT, NO_RESULT or CANCEL_RESULT.

showPExternalOptionPane

public static final int showPExternalOptionPane(javax.swing.JComponent component,
                                                java.lang.String module,
                                                java.awt.Container parent,
                                                int type,
                                                javax.swing.Icon icon,
                                                int option,
                                                boolean allowIcon)
Creates a new option pane as a frame.
Parameters:
component - The component to add inside this option pane.
module - The module of this option pane.
parent - The parent of this pane, used to block the parent's window.
type - The type of this option pane see ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE or PLAIN_MESSAGE.
icon - The icon to use, or null when using the default icon.
option - The option of this pane : DEFAULT_OPTION, OK_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.
allowIcon - if true an icon will be displayed on the left side of the component.
Returns:
Depending of the used type : UNKNOWN_RESULT, OK_RESULT, YES_RESULT, NO_RESULT or CANCEL_RESULT.

showPExternalOptionPane

public static final int showPExternalOptionPane(javax.swing.JComponent component,
                                                java.lang.String module,
                                                java.awt.Container parent,
                                                int type,
                                                java.lang.String titleKey,
                                                javax.swing.Icon icon,
                                                int option,
                                                boolean allowIcon)
Creates a new option pane as a frame.
Parameters:
component - The component to add inside this option pane.
module - The module of this option pane.
parent - The parent of this pane, used to block the parent's window.
type - The type of this option pane see ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE or PLAIN_MESSAGE.
titleKey - The localized title of this option pane.
icon - The icon to use, or null when using the default icon.
option - The option of this pane : DEFAULT_OPTION, OK_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.
allowIcon - if true an icon will be displayed on the left side of the component.
Returns:
Depending of the used type : UNKNOWN_RESULT, OK_RESULT, YES_RESULT, NO_RESULT or CANCEL_RESULT.

showPExternalOptionPane

public static final int showPExternalOptionPane(java.lang.String message,
                                                java.awt.Container parent,
                                                int type,
                                                javax.swing.Icon icon,
                                                int option)
Creates a new option pane as a frame.
Parameters:
message - The message to show inside this option pane.
parent - The parent of this pane, used to block the parent's window.
type - The type of this option pane see ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE or PLAIN_MESSAGE.
icon - The icon to use, or null when using the default icon.
option - The option of this pane : DEFAULT_OPTION, OK_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.
Returns:
Depending of the used type : UNKNOWN_RESULT, OK_RESULT, YES_RESULT, NO_RESULT or CANCEL_RESULT.

showPExternalOptionPane

public static final int showPExternalOptionPane(java.lang.String message,
                                                java.lang.String module,
                                                java.awt.Container parent,
                                                int type,
                                                javax.swing.Icon icon,
                                                int option)
Creates a new option pane as a frame.
Parameters:
message - The message to show inside this option pane.
module - The module of this option pane.
parent - The parent of this pane, used to block the parent's window.
type - The type of this option pane see ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE or PLAIN_MESSAGE.
icon - The icon to use, or null when using the default icon.
option - The option of this pane : DEFAULT_OPTION, OK_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.
Returns:
Depending of the used type : UNKNOWN_RESULT, OK_RESULT, YES_RESULT, NO_RESULT or CANCEL_RESULT.

showPExternalOptionPane

public static final int showPExternalOptionPane(java.lang.String message,
                                                java.lang.String module,
                                                java.awt.Container parent,
                                                int type,
                                                java.lang.String titleKey,
                                                javax.swing.Icon icon,
                                                int option)
Creates a new option pane as a frame.
Parameters:
message - The message to show inside this option pane.
module - The module of this option pane.
parent - The parent of this pane, used to block the parent's window.
type - The type of this option pane see ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE or PLAIN_MESSAGE.
icon - The icon to use, or null when using the default icon.
option - The option of this pane : DEFAULT_OPTION, OK_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.
Returns:
Depending of the used type : UNKNOWN_RESULT, OK_RESULT, YES_RESULT, NO_RESULT or CANCEL_RESULT.

showPExternalOptionPane

public static final int showPExternalOptionPane(java.lang.String message,
                                                java.lang.String module,
                                                java.awt.Container parent,
                                                int type,
                                                java.lang.String titleKey,
                                                javax.swing.Icon icon,
                                                int option,
                                                boolean allowIcon)
Creates a new option pane as a frame.
Parameters:
message - The message to show inside this option pane.
module - The module of this option pane.
parent - The parent of this pane, used to block the parent's window.
type - The type of this option pane see ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE or PLAIN_MESSAGE.
titleKey - The localized title of this option pane.
icon - The icon to use, or null when using the default icon.
option - The option of this pane : DEFAULT_OPTION, OK_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.
Returns:
Depending of the used type : UNKNOWN_RESULT, OK_RESULT, YES_RESULT, NO_RESULT or CANCEL_RESULT.

showExternalInformationDialog

public static final int showExternalInformationDialog(java.lang.String message,
                                                      java.awt.Container parent)
Creates an information dialog with an OK button within a frame.
Parameters:
message - The message to show inside this option pane.
parent - The parent of this pane, used to block the parent's window.
Returns:
UNKNOWN_RESULT or OK_RESULT.

showExternalInformationDialog

public static final int showExternalInformationDialog(java.lang.String message,
                                                      java.awt.Container parent,
                                                      java.lang.String module)
Creates an information dialog with an OK button within a frame.
Parameters:
message - The message to show inside this option pane.
parent - The parent of this pane, used to block the parent's window.
module - The module of this option pane.
Returns:
UNKNOWN_RESULT or OK_RESULT.

showExternalErrorDialog

public static final int showExternalErrorDialog(java.lang.String message,
                                                java.awt.Container parent)
Creates an error dialog with an OK button within a frame.
Parameters:
message - The message to show inside this option pane.
parent - The parent of this pane, used to block the parent's window.
Returns:
UNKNOWN_RESULT or OK_RESULT.

showExternalErrorDialog

public static final int showExternalErrorDialog(java.lang.String message,
                                                java.awt.Container parent,
                                                java.lang.String module)
Creates an error dialog with an OK button within a frame.
Parameters:
message - The message to show inside this option pane.
parent - The parent of this pane, used to block the parent's window.
module - The module of this option pane.
Returns:
UNKNOWN_RESULT or OK_RESULT.

showExternalConfirmationDialog

public static final int showExternalConfirmationDialog(java.lang.String message,
                                                       java.awt.Container parent)
Creates a confirmation dialog with YES and NO buttons within a frame.
Parameters:
message - The message to show inside this option pane.
parent - The parent of this pane, used to block the parent's window.
Returns:
UNKNOWN_RESULT, YES_RESULT or NO_RESULT.

showExternalConfirmationDialog

public static final int showExternalConfirmationDialog(java.lang.String message,
                                                       java.awt.Container parent,
                                                       java.lang.String module)
Creates a confirmation dialog with YES and NO buttons within a frame.
Parameters:
message - The message to show inside this option pane.
parent - The parent of this pane, used to block the parent's window.
module - The module of this option pane.
Returns:
UNKNOWN_RESULT, YES_RESULT or NO_RESULT.

showExternalMessageDialog

public static final int showExternalMessageDialog(java.lang.String message,
                                                  java.awt.Container parent)
Creates a message dialog with an OK button within a frame.
Parameters:
message - The message to show inside this option pane.
parent - The parent of this pane, used to block the parent's window.
Returns:
UNKNOWN_RESULT or OK_RESULT.

showExternalMessageDialog

public static final int showExternalMessageDialog(java.lang.String message,
                                                  java.awt.Container parent,
                                                  java.lang.String module)
Creates a message dialog with an OK button within a frame.
Parameters:
message - The message to show inside this option pane.
parent - The parent of this pane, used to block the parent's window.
module - The module of this option pane.
Returns:
UNKNOWN_RESULT or OK_RESULT.

showExternalWarningDialog

public static final int showExternalWarningDialog(java.lang.String message,
                                                  java.awt.Container parent)
Creates a warning dialog with an OK button within a frame.
Parameters:
message - The message to show inside this option pane.
parent - The parent of this pane, used to block the parent's window.
Returns:
UNKNOWN_RESULT or OK_RESULT.

showExternalWarningDialog

public static final int showExternalWarningDialog(java.lang.String message,
                                                  java.awt.Container parent,
                                                  java.lang.String module)
Creates a warning dialog with an OK button within a frame.
Parameters:
message - The message to show inside this option pane.
parent - The parent of this pane, used to block the parent's window.
module - The module of this option pane.
Returns:
UNKNOWN_RESULT or OK_RESULT.

showPOptionPane

public static final int showPOptionPane(javax.swing.JComponent component,
                                        java.lang.String module,
                                        java.awt.Container parent,
                                        int type,
                                        java.lang.String titleKey,
                                        javax.swing.Icon icon,
                                        int option,
                                        boolean allowIcon,
                                        int displayMode)
Shows a blocking dialog box.
Parameters:
component - The component to add inside this option pane.
module - The module of this option pane.
parent - The parent of this pane, used to block the parent's window.
titleKey - The localized title of this option pane.
type - The type of this option pane see ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE or PLAIN_MESSAGE.
icon - The icon to use, or null when using the default icon.
option - The option of this pane : DEFAULT_OPTION, OK_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_OPTION.
allowIcon - if true an icon will be displayed on the left side of the component.
displayMode - The mode used to display this option pane : INTERNAL_OPTION_PANE or EXTERNAL_OPTION_PANE.
Returns:
Depending of the used type : UNKNOWN_RESULT, OK_RESULT, YES_RESULT, NO_RESULT or CANCEL_RESULT.