planetj.gui
Class CMOptionPaneJ

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JOptionPane
                          |
                          +--planetj.gui.CMOptionPaneJ
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable

public class CMOptionPaneJ
extends JOptionPane

CMOptionPaneJ is an extension of the JOptionPane that adds internationalization. Implementors of this class must be sure to call the CM methods, as opposed to directly calling the methods of the JOptionPane, in order to utilize internationalization.

See Also:
Serialized Form

Field Summary
static int CANCEL_OPTION
          Return value from class method if CANCEL is chosen.
static int CLOSED_OPTION
          Return value from class method if user closes window without selecting anything, more than likely this should be treated as either a CANCEL_OPTION or NO_OPTION.
static int DEFAULT_OPTION
          Type meaning look and feel should not supply any options -- only use the options from the JOptionPane.
static int ERROR_MESSAGE
          Used for error messages.
static String ICON_PROPERTY
          Bound property name for icon.
static int INFORMATION_MESSAGE
          Used for information messages.
static String INITIAL_SELECTION_VALUE_PROPERTY
          Bound property name for initialSelectionValue.
static String INITIAL_VALUE_PROPERTY
          Bounds property name for initialValue.
static String INPUT_VALUE_PROPERTY
          Bound property name for inputValue.
static String MESSAGE_PROPERTY
          Bound property name for message.
static String MESSAGE_TYPE_PROPERTY
          Bounds property name for type.
static int NO_OPTION
          Return value from class method if NO is chosen.
static int OK_CANCEL_OPTION
          Type used for showConfirmDialog.
static int OK_OPTION
          Return value form class method if OK is chosen.
static String OPTION_TYPE_PROPERTY
          Bound property name for optionType.
static String OPTIONS_PROPERTY
          Bounds property namer for option.
static int PLAIN_MESSAGE
          No icon is used.
static int QUESTION_MESSAGE
          Used for questions.
static String SELECTION_VALUES_PROPERTY
          Bound property name for selectionValues.
static Object UNINITIALIZED_VALUE
          Indicates that the user has not yet selected a value.
static String VALUE_PROPERTY
          Bounds property name for value.
static String WANTS_INPUT_PROPERTY
          Bound property name for wantsInput.
static int WARNING_MESSAGE
          Used for warning messages.
static int YES_NO_CANCEL_OPTION
          Type used for showConfirmDialog.
static int YES_NO_OPTION
          Type used for showConfirmDialog.
static int YES_OPTION
          Return value from class method if YES is chosen.
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
CMOptionPaneJ()
          CMOptionPaneJ constructor comment.
CMOptionPaneJ(Object message)
          CMOptionPaneJ constructor comment.
CMOptionPaneJ(Object message, int messageType)
          CMOptionPaneJ constructor comment.
CMOptionPaneJ(Object message, int messageType, int optionType)
          CMOptionPaneJ constructor comment.
CMOptionPaneJ(Object message, int messageType, int optionType, Icon icon)
          CMOptionPaneJ constructor comment.
CMOptionPaneJ(Object message, int messageType, int optionType, Icon icon, Object[] options)
          CMOptionPaneJ constructor comment.
CMOptionPaneJ(Object message, int messageType, int optionType, Icon icon, Object[] options, Object initialValue)
          CMOptionPaneJ constructor comment.
 
Method Summary
 void setMessage(Object newMessage)
          This method was overridden for I18N.
 void show()
          Ensure Default Cursor
static int showCMConfirmDialog(Component parentComponent, Object message)
          Overrides the JOptionPane method to provide internationalization.
static int showCMConfirmDialog(Component parentComponent, Object message, String title, int optionType)
          Overrides the JOptionPane method to provide internationalization.
static int showCMConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType)
          Overrides the JOptionPane method to provide internationalization.
static int showCMConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon)
           
static String showCMInputDialog(Component parentComponent, Object message)
          Overrides the JOptionPane method to provide internationalization.
static String showCMInputDialog(Component parentComponent, Object message, String title, int messageType)
          Overrides the JOptionPane method to provide internationalization.
static Object showCMInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSelectionValue)
          Overrides the JOptionPane method to provide internationalization.
static String showCMInputDialog(Object message)
          Overrides the JOptionPane method to provide internationalization.
static int showCMInternalConfirmDialog(Component parentComponent, Object message)
          Overrides the JOptionPane method to provide internationalization.
static int showCMInternalConfirmDialog(Component parentComponent, Object message, String title, int optionType)
          Overrides the JOptionPane method to provide internationalization.
static int showCMInternalConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType)
          Overrides the JOptionPane method to provide internationalization.
static int showCMInternalConfirmDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon)
          Overrides the JOptionPane method to provide internationalization.
static String showCMInternalInputDialog(Component parentComponent, Object message)
          Overrides the JOptionPane method to provide internationalization.
static String showCMInternalInputDialog(Component parentComponent, Object message, String title, int messageType)
          Overrides the JOptionPane method to provide internationalization.
static Object showCMInternalInputDialog(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSelectionValue)
          Overrides the JOptionPane method to provide internationalization.
static void showCMInternalMessageDialog(Component parentComponent, Object message)
          Overrides the JOptionPane method to provide internationalization.
static void showCMInternalMessageDialog(Component parentComponent, Object message, String title, int messageType)
          Overrides the JOptionPane method to provide internationalization.
static void showCMInternalMessageDialog(Component parentComponent, Object message, String title, int messageType, Icon icon)
          Overrides the JOptionPane method to provide internationalization.
static int showCMInternalOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue)
          Overrides the JOptionPane method to provide internationalization.
static void showCMMessageDialog(Component parentComponent, Object message)
          Overrides the JOptionPane method to provide internationalization.
static void showCMMessageDialog(Component parentComponent, Object message, String title, int messageType)
          Overrides the JOptionPane method to provide internationalization.
static void showCMMessageDialog(Component parentComponent, Object message, String title, int messageType, Icon icon)
          Overrides the JOptionPane method to provide internationalization.
static int showCMOptionDialog(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue)
          Overrides the JOptionPane method to provide internationalization.
 
Methods inherited from class javax.swing.JOptionPane
createDialog, createInternalFrame, getAccessibleContext, getDesktopPaneForComponent, getFrameForComponent, getIcon, getInitialSelectionValue, getInitialValue, getInputValue, getMaxCharactersPerLineCount, getMessage, getMessageType, getOptions, getOptionType, getRootFrame, getSelectionValues, getUI, getUIClassID, getValue, getWantsInput, selectInitialValue, setIcon, setInitialSelectionValue, setInitialValue, setInputValue, setMessageType, setOptions, setOptionType, setRootFrame, setSelectionValues, setUI, setValue, setWantsInput, showConfirmDialog, showConfirmDialog, showConfirmDialog, showConfirmDialog, showInputDialog, showInputDialog, showInputDialog, showInputDialog, showInputDialog, showInputDialog, showInternalConfirmDialog, showInternalConfirmDialog, showInternalConfirmDialog, showInternalConfirmDialog, showInternalInputDialog, showInternalInputDialog, showInternalInputDialog, showInternalMessageDialog, showInternalMessageDialog, showInternalMessageDialog, showInternalOptionDialog, showMessageDialog, showMessageDialog, showMessageDialog, showOptionDialog, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNINITIALIZED_VALUE

public static final Object UNINITIALIZED_VALUE
Indicates that the user has not yet selected a value.


DEFAULT_OPTION

public static final int DEFAULT_OPTION
Type meaning look and feel should not supply any options -- only use the options from the JOptionPane.

See Also:
Constant Field Values

YES_NO_OPTION

public static final int YES_NO_OPTION
Type used for showConfirmDialog.

See Also:
Constant Field Values

YES_NO_CANCEL_OPTION

public static final int YES_NO_CANCEL_OPTION
Type used for showConfirmDialog.

See Also:
Constant Field Values

OK_CANCEL_OPTION

public static final int OK_CANCEL_OPTION
Type used for showConfirmDialog.

See Also:
Constant Field Values

YES_OPTION

public static final int YES_OPTION
Return value from class method if YES is chosen.

See Also:
Constant Field Values

NO_OPTION

public static final int NO_OPTION
Return value from class method if NO is chosen.

See Also:
Constant Field Values

CANCEL_OPTION

public static final int CANCEL_OPTION
Return value from class method if CANCEL is chosen.

See Also:
Constant Field Values

OK_OPTION

public static final int OK_OPTION
Return value form class method if OK is chosen.

See Also:
Constant Field Values

CLOSED_OPTION

public static final int CLOSED_OPTION
Return value from class method if user closes window without selecting anything, more than likely this should be treated as either a CANCEL_OPTION or NO_OPTION.

See Also:
Constant Field Values

ERROR_MESSAGE

public static final int ERROR_MESSAGE
Used for error messages.

See Also:
Constant Field Values

INFORMATION_MESSAGE

public static final int INFORMATION_MESSAGE
Used for information messages.

See Also:
Constant Field Values

WARNING_MESSAGE

public static final int WARNING_MESSAGE
Used for warning messages.

See Also:
Constant Field Values

QUESTION_MESSAGE

public static final int QUESTION_MESSAGE
Used for questions.

See Also:
Constant Field Values

PLAIN_MESSAGE

public static final int PLAIN_MESSAGE
No icon is used.

See Also:
Constant Field Values

ICON_PROPERTY

public static final String ICON_PROPERTY
Bound property name for icon.

See Also:
Constant Field Values

MESSAGE_PROPERTY

public static final String MESSAGE_PROPERTY
Bound property name for message.

See Also:
Constant Field Values

VALUE_PROPERTY

public static final String VALUE_PROPERTY
Bounds property name for value.

See Also:
Constant Field Values

OPTIONS_PROPERTY

public static final String OPTIONS_PROPERTY
Bounds property namer for option.

See Also:
Constant Field Values

INITIAL_VALUE_PROPERTY

public static final String INITIAL_VALUE_PROPERTY
Bounds property name for initialValue.

See Also:
Constant Field Values

MESSAGE_TYPE_PROPERTY

public static final String MESSAGE_TYPE_PROPERTY
Bounds property name for type.

See Also:
Constant Field Values

OPTION_TYPE_PROPERTY

public static final String OPTION_TYPE_PROPERTY
Bound property name for optionType.

See Also:
Constant Field Values

SELECTION_VALUES_PROPERTY

public static final String SELECTION_VALUES_PROPERTY
Bound property name for selectionValues.

See Also:
Constant Field Values

INITIAL_SELECTION_VALUE_PROPERTY

public static final String INITIAL_SELECTION_VALUE_PROPERTY
Bound property name for initialSelectionValue.

See Also:
Constant Field Values

INPUT_VALUE_PROPERTY

public static final String INPUT_VALUE_PROPERTY
Bound property name for inputValue.

See Also:
Constant Field Values

WANTS_INPUT_PROPERTY

public static final String WANTS_INPUT_PROPERTY
Bound property name for wantsInput.

See Also:
Constant Field Values
Constructor Detail

CMOptionPaneJ

public CMOptionPaneJ()
CMOptionPaneJ constructor comment.


CMOptionPaneJ

public CMOptionPaneJ(Object message)
CMOptionPaneJ constructor comment.

Parameters:
message - java.lang.Object

CMOptionPaneJ

public CMOptionPaneJ(Object message,
                     int messageType)
CMOptionPaneJ constructor comment.

Parameters:
message - java.lang.Object
messageType - int

CMOptionPaneJ

public CMOptionPaneJ(Object message,
                     int messageType,
                     int optionType)
CMOptionPaneJ constructor comment.

Parameters:
message - java.lang.Object
messageType - int
optionType - int

CMOptionPaneJ

public CMOptionPaneJ(Object message,
                     int messageType,
                     int optionType,
                     Icon icon)
CMOptionPaneJ constructor comment.

Parameters:
message - java.lang.Object
messageType - int
optionType - int
icon - javax.swing.Icon

CMOptionPaneJ

public CMOptionPaneJ(Object message,
                     int messageType,
                     int optionType,
                     Icon icon,
                     Object[] options)
CMOptionPaneJ constructor comment.

Parameters:
message - java.lang.Object
messageType - int
optionType - int
icon - javax.swing.Icon
options - java.lang.Object[]

CMOptionPaneJ

public CMOptionPaneJ(Object message,
                     int messageType,
                     int optionType,
                     Icon icon,
                     Object[] options,
                     Object initialValue)
CMOptionPaneJ constructor comment.

Parameters:
message - java.lang.Object
messageType - int
optionType - int
icon - javax.swing.Icon
options - java.lang.Object[]
initialValue - java.lang.Object
Method Detail

setMessage

public void setMessage(Object newMessage)
This method was overridden for I18N.

Overrides:
setMessage in class JOptionPane

show

public void show()
Ensure Default Cursor

Overrides:
show in class Component

showCMConfirmDialog

public static int showCMConfirmDialog(Component parentComponent,
                                      Object message)
Overrides the JOptionPane method to provide internationalization.

Parameters:
parentComponent - Determines the Frame in which the dialog is displayed. If null, or if the parentComponent has no Frame, a default Frame is used.
message - The Object to display
Returns:
an int indicating the option selected by the user

showCMConfirmDialog

public static int showCMConfirmDialog(Component parentComponent,
                                      Object message,
                                      String title,
                                      int optionType)
Overrides the JOptionPane method to provide internationalization.

Parameters:
parentComponent - Determines the Frame in which the dialog is displayed. If null, or if the parentComponent has no Frame, a default Frame is used.
message - The Object to display
title - the title string for the dialog
optionType - an int designating the options available on the dialog: YES_NO_OPTION, or YES_NO_CANCEL_OPTION
Returns:
an int indicating the option selected by the user

showCMConfirmDialog

public static int showCMConfirmDialog(Component parentComponent,
                                      Object message,
                                      String title,
                                      int optionType,
                                      int messageType)
Overrides the JOptionPane method to provide internationalization.

Parameters:
parentComponent - Determines the Frame in which the dialog is displayed. If null, or if the parentComponent has no Frame, a default Frame is used.
message - The Object to display
title - the title string for the dialog
optionType - an int designating the options available on the dialog: YES_NO_OPTION, or YES_NO_CANCEL_OPTION
messageType - an int designating the kind of message this is, primarily used to determine the icon from the pluggable look and feel: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE.
Returns:
an int indicating the option selected by the user

showCMConfirmDialog

public static int showCMConfirmDialog(Component parentComponent,
                                      Object message,
                                      String title,
                                      int optionType,
                                      int messageType,
                                      Icon icon)

showCMInputDialog

public static String showCMInputDialog(Component parentComponent,
                                       Object message)
Overrides the JOptionPane method to provide internationalization.

Parameters:
parentComponent - the parent Component for the dialog
message - the Object to display

showCMInputDialog

public static String showCMInputDialog(Component parentComponent,
                                       Object message,
                                       String title,
                                       int messageType)
Overrides the JOptionPane method to provide internationalization.

Parameters:
parentComponent - the parent Component for the dialog
message - the Object to display
title - the String to display in the dialog title bar
messageType - the type of message that is to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE.

showCMInputDialog

public static Object showCMInputDialog(Component parentComponent,
                                       Object message,
                                       String title,
                                       int messageType,
                                       Icon icon,
                                       Object[] selectionValues,
                                       Object initialSelectionValue)
Overrides the JOptionPane method to provide internationalization.

Parameters:
parentComponent - the parent Component for the dialog
message - the Object to display
title - the String to display in the dialog title bar
messageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE.
icon - the Icon image to display
selectionValues - an array of Objects that gives the possible selections
initialSelectionValue - the value used to initialize the input field
Returns:
users input, or null meaning the user canceled the input

showCMInputDialog

public static String showCMInputDialog(Object message)
Overrides the JOptionPane method to provide internationalization.

Parameters:
message - the Object to display

showCMInternalConfirmDialog

public static int showCMInternalConfirmDialog(Component parentComponent,
                                              Object message)
Overrides the JOptionPane method to provide internationalization.

Parameters:
parentComponent - Determines the Frame in which the dialog is displayed. If null, or if the parentComponent has no Frame, a default Frame is used.
message - The Object to display
Returns:
an int indicating the option selected by the user

showCMInternalConfirmDialog

public static int showCMInternalConfirmDialog(Component parentComponent,
                                              Object message,
                                              String title,
                                              int optionType)
Overrides the JOptionPane method to provide internationalization.

Parameters:
parentComponent - Determines the Frame in which the dialog is displayed. If null, or if the parentComponent has no Frame, a default Frame is used.
message - The object to display in the dialog. A Component object is rendered as a Component. A String object is rendered as a string. Other objects are converted to a String using the toString method.
title - the title string for the dialog
optionType - an int designating the options available on the dialog: YES_NO_OPTION, or YES_NO_CANCEL_OPTION
Returns:
an int indicating the option selected by the user

showCMInternalConfirmDialog

public static int showCMInternalConfirmDialog(Component parentComponent,
                                              Object message,
                                              String title,
                                              int optionType,
                                              int messageType)
Overrides the JOptionPane method to provide internationalization.

Parameters:
parentComponent - Determines the Frame in which the dialog is displayed. If null, or if the parentComponent has no Frame, a default Frame is used.
message - The object to display in the dialog. A Component object is rendered as a Component. A String object is rendered as a string. Other objects are converted to a String using the toString method.
title - the title string for the dialog
optionType - an int designating the options available on the dialog: YES_NO_OPTION, or YES_NO_CANCEL_OPTION
messageType - an int designating the kind of message this is, primarily used to determine the icon from the pluggable look and feel: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE.
Returns:
an int indicating the option selected by the user

showCMInternalConfirmDialog

public static int showCMInternalConfirmDialog(Component parentComponent,
                                              Object message,
                                              String title,
                                              int optionType,
                                              int messageType,
                                              Icon icon)
Overrides the JOptionPane method to provide internationalization.

Parameters:
parentComponent - Determines the Frame in which the dialog is displayed. If null, or if the parentComponent has no Frame, a default Frame is used.
message - The object to display in the dialog. A Component object is rendered as a Component. A String object is rendered as a string. Other objects are converted to a String using the toString method.
title - the title string for the dialog
optionType - an int designating the options available on the dialog: YES_NO_OPTION, or YES_NO_CANCEL_OPTION
messageType - an int designating the kind of message this is, primarily used to determine the icon from the pluggable look and feel: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE.
icon - the icon to display in the dialog
Returns:
an int indicating the option selected by the user

showCMInternalInputDialog

public static String showCMInternalInputDialog(Component parentComponent,
                                               Object message)
Overrides the JOptionPane method to provide internationalization.

Parameters:
parentComponent - the parent Component for the dialog
message - the Object to display

showCMInternalInputDialog

public static String showCMInternalInputDialog(Component parentComponent,
                                               Object message,
                                               String title,
                                               int messageType)
Overrides the JOptionPane method to provide internationalization.

Parameters:
parentComponent - the parent Component for the dialog
message - the Object to display
title - the String to display in the dialog title bar
messageType - the type of message that is to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE.

showCMInternalInputDialog

public static Object showCMInternalInputDialog(Component parentComponent,
                                               Object message,
                                               String title,
                                               int messageType,
                                               Icon icon,
                                               Object[] selectionValues,
                                               Object initialSelectionValue)
Overrides the JOptionPane method to provide internationalization.

Parameters:
parentComponent - the parent Component for the dialog
message - the Object to display
title - the String to display in the dialog title bar
messageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE.
icon - the Icon image to display
selectionValues - an array of Objects that gives the possible selections
initialSelectionValue - the value used to initialize the input field
Returns:
users input, or null meaning the user canceled the input

showCMInternalMessageDialog

public static void showCMInternalMessageDialog(Component parentComponent,
                                               Object message)
Overrides the JOptionPane method to provide internationalization.

Parameters:
parentComponent - Determines the Frame in which the dialog is displayed. If null, or if the parentComponent has no Frame, a default Frame is used.
message - The object to display

showCMInternalMessageDialog

public static void showCMInternalMessageDialog(Component parentComponent,
                                               Object message,
                                               String title,
                                               int messageType)
Overrides the JOptionPane method to provide internationalization.

Parameters:
parentComponent - Determines the Frame in which the dialog is displayed. If null, or if the parentComponent has no Frame, a default Frame is used.
message - The Object to display
title - the title string for the dialog
messageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE.

showCMInternalMessageDialog

public static void showCMInternalMessageDialog(Component parentComponent,
                                               Object message,
                                               String title,
                                               int messageType,
                                               Icon icon)
Overrides the JOptionPane method to provide internationalization.

Parameters:
parentComponent - Determines the Frame in which the dialog is displayed. If null, or if the parentComponent has no Frame, a default Frame is used.
message - The Object to display
title - the title string for the dialog
messageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE.
icon - an icon to display in the dialog that helps the user identify the kind of message that is being displayed.

showCMInternalOptionDialog

public static int showCMInternalOptionDialog(Component parentComponent,
                                             Object message,
                                             String title,
                                             int optionType,
                                             int messageType,
                                             Icon icon,
                                             Object[] options,
                                             Object initialValue)
Overrides the JOptionPane method to provide internationalization.

Parameters:
parentComponent - Determines the Frame in which the dialog is displayed. If null, or if the parentComponent has no Frame, a default Frame is used.
message - The object to display in the dialog. A Component object is rendered as a Component. A String object is rendered as a string. Other objects are converted to a String using the toString method.
title - the title string for the dialog
optionType - an int designating the options available on the dialog: YES_NO_OPTION, or YES_NO_CANCEL_OPTION
messageType - an int designating the kind of message this is, primarily used to determine the icon from the pluggable look and feel: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE.
icon - the icon to display in the dialog
options - an array of objects indicating the possible choices the user can make. If the objects are components, they are rendered properly. Non-String objects are rendered using their toString methods. If this parameter is null, the options are determined by the look and feel.
initialValue - the object that represents the default selection for the dialog
Returns:
an int indicating the option chosen by the user, or CLOSED_OPTION if the user closed the Dialog

showCMMessageDialog

public static void showCMMessageDialog(Component parentComponent,
                                       Object message)
Overrides the JOptionPane method to provide internationalization.

Parameters:
parentComponent - Determines the Frame in which the dialog is displayed. If null, or if the parentComponent has no Frame, a default Frame is used.
message - The Object to display

showCMMessageDialog

public static void showCMMessageDialog(Component parentComponent,
                                       Object message,
                                       String title,
                                       int messageType)
Overrides the JOptionPane method to provide internationalization.

Parameters:
parentComponent - Determines the Frame in which the dialog is displayed. If null, or if the parentComponent has no Frame, a default Frame is used.
message - The Object to display
title - the title string for the dialog
messageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE.

showCMMessageDialog

public static void showCMMessageDialog(Component parentComponent,
                                       Object message,
                                       String title,
                                       int messageType,
                                       Icon icon)
Overrides the JOptionPane method to provide internationalization.

Parameters:
parentComponent - Determines the Frame in which the dialog is displayed. If null, or if the parentComponent has no Frame, a default Frame is used.
message - The Object to display
title - the title string for the dialog
messageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE.
icon - an icon to display in the dialog that helps the user identify the kind of message that is being displayed.

showCMOptionDialog

public static int showCMOptionDialog(Component parentComponent,
                                     Object message,
                                     String title,
                                     int optionType,
                                     int messageType,
                                     Icon icon,
                                     Object[] options,
                                     Object initialValue)
Overrides the JOptionPane method to provide internationalization.

Parameters:
parentComponent - Determines the Frame in which the dialog is displayed. If null, or if the parentComponent has no Frame, a default Frame is used.
message - The Object to display
title - the title string for the dialog
optionType - an int designating the options available on the dialog: YES_NO_OPTION, or YES_NO_CANCEL_OPTION
messageType - an int designating the kind of message this is, primarily used to determine the icon from the pluggable look and feel: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE.
icon - the icon to display in the dialog
options - an array of objects indicating the possible choices the user can make. If the objects are components, they are rendered properly. Non-String objects are rendered using their toString methods. If this parameter is null, the options are determined by the look and feel.
initialValue - the object that represents the default selection for the dialog
Returns:
an int indicating the option chosen by the user, or CLOSED_OPTION if the user closed the Dialog