yu.ac.bg.etf.javaqx.qswing
Class JQOptionPane

java.lang.Object
  extended byyu.ac.bg.etf.javaqx.core.AbstractDisposable
      extended byyu.ac.bg.etf.javaqx.qswing.JQComponent
          extended byyu.ac.bg.etf.javaqx.qswing.JQContainer
              extended byyu.ac.bg.etf.javaqx.qswing.JQWindow
                  extended byyu.ac.bg.etf.javaqx.qswing.JQDialog
                      extended byyu.ac.bg.etf.javaqx.qswing.JQOptionPane
All Implemented Interfaces:
Disposable, JQComponentProperties, JQContainerProperties, JQWindowConstants, JQWindowProperties

public final class JQOptionPane
extends JQDialog

Option Pane Component.

NOTE: This class is not compatible with javax.swing.JColorChooser class!

Version:
0.2.0
Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)

Field Summary
static int ABORT_OPTION
          Abort option (the value is 262144).
static int ABORT_RETRY_IGNORE_OPTIONS
          Abort, Retry and Ignore options (the value is 1835008).
static int ABOUT_MESSAGE
          About message type (the value is 4).
static int APPLY_OPTION
          Apply option (the value is 33554432).
static int CANCEL_OPTION
          Cancel option (the value is 4194304).
static int CLOSE_OPTION
          Close option (the value is 2097152).
static int DISCARD_OPTION
          Discard option (the value is 8388608).
static int ERROR_MESSAGE
          Plain message type (the value is 0).
static int HELP_OPTION
          Help option (the value is 16777216).
static int IGNORE_OPTION
          Ignore option (the value is 1048576).
static int INFORMATION_MESSAGE
          Information message type (the value is 1).
static int NO_OPTION
          No option (the value is 65536).
static int NO_TO_ALL_OPTION
          Not to all option (the value is 131072).
static int NONE_OPTION
          None option (the value is 0).
static int OK_OPTION
          Ok option (the value is 1024).
static int OPEN_OPTION
          Open option (the value is 8192).
static int PLAIN_MESSAGE
          Plain message type (the value is -1).
static int QUESTION_MESSAGE
          Question message type (the value is 3).
static int RESET_OPTION
          Reset option (the value is 67108864).
static int RESTORE_DEFAULTS_OPTION
          None option (the value is 134217728).
static int RETRY_OPTION
          Retry option (the value is 524288).
static int SAVE_ALL_OPTION
          Save all option (the value is 4096).
static int SAVE_OPTION
          Save option (the value is 2048).
static int WARNING_MESSAGE
          Warning message type (the value is 2).
static int YES_NO_CANCEL_OPTIONS
          Yes, No and Cancel options (the value is 4276224).
static int YES_NO_OPTIONS
          Yes and No options (the value is 81920).
static int YES_OPTION
          Yes option (the value is 16384).
static int YES_TO_ALL_OPTION
          None option (the value is 32768).
 
Fields inherited from class yu.ac.bg.etf.javaqx.qswing.JQDialog
ACCEPTED, REJECTED
 
Fields inherited from class yu.ac.bg.etf.javaqx.qswing.JQWindow
ALWAYS_ON_TOP_WINDOW_SUPPORTED, BORDER_HELP_BUTTON, BORDER_MAXIMIZE_BUTTON, BORDER_MINIMIZE_BUTTON, BORDER_SYSTEM_MENU, BORDER_TITLE, BORDER_UNDECORATED, FULL_SCREEN_WINDOW_SUPPORTED, TYPE_DIALOG, TYPE_POPUP, TYPE_SPLASH_SCREEN, TYPE_TOOL, TYPE_WINDOW, WINDOW_OPACITY_SUPPORTED, WINDOW_SHAPE_SUPPORTED
 
Fields inherited from class yu.ac.bg.etf.javaqx.qswing.JQComponent
listenerList
 
Fields inherited from interface yu.ac.bg.etf.javaqx.qswing.JQWindowConstants
APPLICATION_MODAL, DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, FULL_SCREEN, HIDE_ON_CLOSE, ICONIFIED, MAXIMIZED, NON_MODAL, NORMAL, POSITION_CUSTOM, QUIT_ON_CLOSE, WINDOW_MODAL
 
Fields inherited from interface yu.ac.bg.etf.javaqx.qswing.properties.JQWindowProperties
PROPERTY_ALWAYS_ON_TOP, PROPERTY_DEFAULT_CLOSE_OPERATION, PROPERTY_ICON_IMAGE, PROPERTY_OPACITY, PROPERTY_SHAPE, PROPERTY_TITLE
 
Fields inherited from interface yu.ac.bg.etf.javaqx.qswing.properties.JQContainerProperties
PROPERTY_LAYOUT_MANAGER
 
Fields inherited from interface yu.ac.bg.etf.javaqx.qswing.properties.JQComponentProperties
PROPERTY_BACKGROUND, PROPERTY_COMPONENT_ORIENTATION, PROPERTY_CONTEXT_MENU, PROPERTY_ENABLED, PROPERTY_FIXED_SIZE, PROPERTY_FOCUSABLE, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_INSETS, PROPERTY_LOCALE, PROPERTY_MAXIMUM_SIZE, PROPERTY_MINIMUM_SIZE, PROPERTY_NAME, PROPERTY_OPAQUE, PROPERTY_PREFERRED_SIZE, PROPERTY_RESOURCE_BUNDLE_NAME, PROPERTY_STATUS_TIP_TEXT, PROPERTY_STYLE_SHEET, PROPERTY_TOOL_TIP_TEXT, PROPERTY_VISIBLE, PROPERTY_WHATS_THIS_TEXT
 
Method Summary
static void showAboutMessage(JQComponent parent, java.lang.String message, java.lang.String title)
          Displays about message.
static int showErrorMessage(JQComponent parent, java.lang.String message, java.lang.String title)
          Displays error message.
static int showErrorMessage(JQComponent parent, java.lang.String message, java.lang.String title, int options)
          Displays error message.
static int showErrorMessage(JQComponent parent, java.lang.String message, java.lang.String title, int options, int defaultOption)
          Displays error message.
static int showInformationMessage(JQComponent parent, java.lang.String message, java.lang.String title)
          Displays information message.
static int showInformationMessage(JQComponent parent, java.lang.String message, java.lang.String title, int options)
          Displays information message.
static int showInformationMessage(JQComponent parent, java.lang.String message, java.lang.String title, int options, int defaultOption)
          Displays information message.
static int showMessage(int messageType, JQComponent parent, java.lang.String text, java.lang.String title, int options, int defaultOption)
          Displays message dialog.
static int showQuestionMessage(JQComponent parent, java.lang.String message, java.lang.String title)
          Displays question message.
static int showQuestionMessage(JQComponent parent, java.lang.String message, java.lang.String title, int options)
          Displays question message.
static int showQuestionMessage(JQComponent parent, java.lang.String message, java.lang.String title, int options, int defaultOption)
          Displays question message.
static int showWarningMessage(JQComponent parent, java.lang.String message, java.lang.String title)
          Displays warning message.
static int showWarningMessage(JQComponent parent, java.lang.String message, java.lang.String title, int options)
          Displays warning message.
static int showWarningMessage(JQComponent parent, java.lang.String message, java.lang.String title, int options, int defaultOption)
          Displays warning message.
 
Methods inherited from class yu.ac.bg.etf.javaqx.qswing.JQDialog
closeDialog, getDialogResult, isAccepted, isRejected, setAccepted, setModal, showDialog
 
Methods inherited from class yu.ac.bg.etf.javaqx.qswing.JQWindow
addWindowListener, getActiveWindow, getBorderDecoration, getDefaultCloseOperation, getIconImage, getModalityType, getOpacity, getOwnedComponents, getOwnedWindows, getState, getTitle, getWindowListeners, getWindowOwner, getWindows, getWindowType, isAlwaysOnTop, isFullScreen, isModal, isUndecorated, paramString, processWindowEvent, removeWindowListener, setAlwaysOnTop, setBorderDecoration, setDefaultCloseOperation, setFixedSize, setFullScreen, setIconImage, setLocationRelativeTo, setModalityType, setOpacity, setState, setTitle, setUndecorated, setWindowOwner, setWindowType, toBack, toFront, toggleFullScreen, updateLocalization
 
Methods inherited from class yu.ac.bg.etf.javaqx.qswing.JQContainer
add, add, add, add, addImpl, doLayout, getComponent, getComponentCount, getComponentIndex, getComponents, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, invalidate, pack, remove, remove, removeAll, setBackground, setComponentOrientation, setForeground, setLayout, validate
 
Methods inherited from class yu.ac.bg.etf.javaqx.qswing.JQComponent
addComponentListener, addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, disableEvents, disposeComponent, disposeObject, enableEvents, eventEnabled, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getClientProperty, getComponentListeners, getComponentOrientation, getContextMenu, getCursor, getEventMask, getFocusListener, getFont, getFontMetrics, getForeground, getHeight, getInsets, getKeyListeners, getLocale, getLocation, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getOwner, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getResourceBundleName, getSize, getStatusTipText, getStyleSheet, getToolTipText, getToolTipText, getWhatsThisText, getWidth, getX, getY, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLeftToRight, isLocaleSet, isOpaque, isOwnerOf, isPainting, isResizable, isResourceBundleNameSet, isUpdatesEnabled, isValid, isVisible, localizeObject, localizeString, localizeString, localizeStrings, paintComponent, processComponentEvent, processContextMenuEvent, processFocusEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, processStyleChange, putClientProperty, removeComponentListener, removeFocusListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, removeStyleSheet, repaint, repaint, repaint, requestFocus, revalidate, setBounds, setBounds, setContextMenu, setCursor, setDefaultResourceBundleName, setDisplayable, setEnabled, setFixedSize, setFocusable, setFont, setInsets, setInsets, setLeftToRightComponentOrientation, setLocale, setLocation, setLocation, setMaximumSize, setMaximumSize, setMinimumSize, setMinimumSize, setName, setOpaque, setPreferredSize, setPreferredSize, setResizable, setResourceBundleName, setRightToLeftComponentOrientation, setSize, setSize, setStatusTipText, setStyleSheet, setStyleSheet, setToolTipText, setUpdatesEnabled, setVisible, setWhatsThisText, toString, unsetComponentOrientation, update, update, update, updateComponentOrientation
 
Methods inherited from class yu.ac.bg.etf.javaqx.core.AbstractDisposable
addDisposeListener, dispose, disposedCheck, disposedErrorString, finalize, isDisposed, removeDisposeListener
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PLAIN_MESSAGE

public static final int PLAIN_MESSAGE
Plain message type (the value is -1).

See Also:
Constant Field Values

ERROR_MESSAGE

public static final int ERROR_MESSAGE
Plain message type (the value is 0).

See Also:
Constant Field Values

INFORMATION_MESSAGE

public static final int INFORMATION_MESSAGE
Information message type (the value is 1).

See Also:
Constant Field Values

WARNING_MESSAGE

public static final int WARNING_MESSAGE
Warning message type (the value is 2).

See Also:
Constant Field Values

QUESTION_MESSAGE

public static final int QUESTION_MESSAGE
Question message type (the value is 3).

See Also:
Constant Field Values

ABOUT_MESSAGE

public static final int ABOUT_MESSAGE
About message type (the value is 4).

See Also:
Constant Field Values

NONE_OPTION

public static final int NONE_OPTION
None option (the value is 0).

See Also:
Constant Field Values

OK_OPTION

public static final int OK_OPTION
Ok option (the value is 1024).

See Also:
Constant Field Values

OPEN_OPTION

public static final int OPEN_OPTION
Open option (the value is 8192).

See Also:
Constant Field Values

SAVE_OPTION

public static final int SAVE_OPTION
Save option (the value is 2048).

See Also:
Constant Field Values

CANCEL_OPTION

public static final int CANCEL_OPTION
Cancel option (the value is 4194304).

See Also:
Constant Field Values

CLOSE_OPTION

public static final int CLOSE_OPTION
Close option (the value is 2097152).

See Also:
Constant Field Values

DISCARD_OPTION

public static final int DISCARD_OPTION
Discard option (the value is 8388608).

See Also:
Constant Field Values

APPLY_OPTION

public static final int APPLY_OPTION
Apply option (the value is 33554432).

See Also:
Constant Field Values

RESET_OPTION

public static final int RESET_OPTION
Reset option (the value is 67108864).

See Also:
Constant Field Values

RESTORE_DEFAULTS_OPTION

public static final int RESTORE_DEFAULTS_OPTION
None option (the value is 134217728).

See Also:
Constant Field Values

HELP_OPTION

public static final int HELP_OPTION
Help option (the value is 16777216).

See Also:
Constant Field Values

SAVE_ALL_OPTION

public static final int SAVE_ALL_OPTION
Save all option (the value is 4096).

See Also:
Constant Field Values

YES_OPTION

public static final int YES_OPTION
Yes option (the value is 16384).

See Also:
Constant Field Values

YES_TO_ALL_OPTION

public static final int YES_TO_ALL_OPTION
None option (the value is 32768).

See Also:
Constant Field Values

NO_OPTION

public static final int NO_OPTION
No option (the value is 65536).

See Also:
Constant Field Values

NO_TO_ALL_OPTION

public static final int NO_TO_ALL_OPTION
Not to all option (the value is 131072).

See Also:
Constant Field Values

ABORT_OPTION

public static final int ABORT_OPTION
Abort option (the value is 262144).

See Also:
Constant Field Values

RETRY_OPTION

public static final int RETRY_OPTION
Retry option (the value is 524288).

See Also:
Constant Field Values

IGNORE_OPTION

public static final int IGNORE_OPTION
Ignore option (the value is 1048576).

See Also:
Constant Field Values

YES_NO_OPTIONS

public static final int YES_NO_OPTIONS
Yes and No options (the value is 81920).

See Also:
Constant Field Values

YES_NO_CANCEL_OPTIONS

public static final int YES_NO_CANCEL_OPTIONS
Yes, No and Cancel options (the value is 4276224).

See Also:
Constant Field Values

ABORT_RETRY_IGNORE_OPTIONS

public static final int ABORT_RETRY_IGNORE_OPTIONS
Abort, Retry and Ignore options (the value is 1835008).

See Also:
Constant Field Values
Method Detail

showMessage

public static int showMessage(int messageType,
                              JQComponent parent,
                              java.lang.String text,
                              java.lang.String title,
                              int options,
                              int defaultOption)
Displays message dialog.

Parameters:
messageType - the message type
parent - the parent component
text - the message text
title - the dialog title
options - the options
defaultOption - the default option
Returns:
selected option

showAboutMessage

public static void showAboutMessage(JQComponent parent,
                                    java.lang.String message,
                                    java.lang.String title)
Displays about message.

Parameters:
parent - the parent component
title - the dialog title
message - the message

showInformationMessage

public static int showInformationMessage(JQComponent parent,
                                         java.lang.String message,
                                         java.lang.String title)
Displays information message.

Parameters:
parent - the parent component
title - the dialog title
message - the message
Returns:
selected option

showInformationMessage

public static int showInformationMessage(JQComponent parent,
                                         java.lang.String message,
                                         java.lang.String title,
                                         int options)
Displays information message.

Parameters:
parent - the parent component
title - the dialog title
message - the message
options - the options
Returns:
selected option

showInformationMessage

public static int showInformationMessage(JQComponent parent,
                                         java.lang.String message,
                                         java.lang.String title,
                                         int options,
                                         int defaultOption)
Displays information message.

Parameters:
parent - the parent component
title - the dialog title
message - the message
options - the options
defaultOption - the default option
Returns:
selected option

showQuestionMessage

public static int showQuestionMessage(JQComponent parent,
                                      java.lang.String message,
                                      java.lang.String title)
Displays question message.

Parameters:
parent - the parent component
title - the dialog title
message - the message
Returns:
selected option

showQuestionMessage

public static int showQuestionMessage(JQComponent parent,
                                      java.lang.String message,
                                      java.lang.String title,
                                      int options)
Displays question message.

Parameters:
parent - the parent component
title - the dialog title
message - the message
options - the options
Returns:
selected option

showQuestionMessage

public static int showQuestionMessage(JQComponent parent,
                                      java.lang.String message,
                                      java.lang.String title,
                                      int options,
                                      int defaultOption)
Displays question message.

Parameters:
parent - the parent component
title - the dialog title
message - the message
options - the options
defaultOption - the default option
Returns:
selected option

showWarningMessage

public static int showWarningMessage(JQComponent parent,
                                     java.lang.String message,
                                     java.lang.String title)
Displays warning message.

Parameters:
parent - the parent component
title - the dialog title
message - the message
Returns:
selected option

showWarningMessage

public static int showWarningMessage(JQComponent parent,
                                     java.lang.String message,
                                     java.lang.String title,
                                     int options)
Displays warning message.

Parameters:
parent - the parent component
title - the dialog title
message - the message
options - the options
Returns:
selected option

showWarningMessage

public static int showWarningMessage(JQComponent parent,
                                     java.lang.String message,
                                     java.lang.String title,
                                     int options,
                                     int defaultOption)
Displays warning message.

Parameters:
parent - the parent component
title - the dialog title
message - the message
options - the options
defaultOption - the default option
Returns:
selected option

showErrorMessage

public static int showErrorMessage(JQComponent parent,
                                   java.lang.String message,
                                   java.lang.String title)
Displays error message.

Parameters:
parent - the parent component
title - the dialog title
message - the message
Returns:
selected option

showErrorMessage

public static int showErrorMessage(JQComponent parent,
                                   java.lang.String message,
                                   java.lang.String title,
                                   int options)
Displays error message.

Parameters:
parent - the parent component
title - the dialog title
message - the message
options - the options
Returns:
selected option

showErrorMessage

public static int showErrorMessage(JQComponent parent,
                                   java.lang.String message,
                                   java.lang.String title,
                                   int options,
                                   int defaultOption)
Displays error message.

Parameters:
parent - the parent component
title - the dialog title
message - the message
options - the options
defaultOption - the default option
Returns:
selected option


Copyright © 2007 ETF and contributors. All Rights Reserved.