|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JOptionPane
pt.moredata.dataentry.util.OptionPane
Extensao a classe javax.swing.JOptionPane. Os dialogos criados por esta classe possuiem uma checkbox que permitem nao mostrar mais o dialogo. Company MoreData
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JOptionPane |
javax.swing.JOptionPane.AccessibleJOptionPane |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary |
| Fields inherited from class javax.swing.JOptionPane |
CANCEL_OPTION, CLOSED_OPTION, DEFAULT_OPTION, ERROR_MESSAGE, icon, ICON_PROPERTY, INFORMATION_MESSAGE, INITIAL_SELECTION_VALUE_PROPERTY, INITIAL_VALUE_PROPERTY, initialSelectionValue, initialValue, INPUT_VALUE_PROPERTY, inputValue, message, MESSAGE_PROPERTY, MESSAGE_TYPE_PROPERTY, messageType, NO_OPTION, OK_CANCEL_OPTION, OK_OPTION, OPTION_TYPE_PROPERTY, options, OPTIONS_PROPERTY, optionType, PLAIN_MESSAGE, QUESTION_MESSAGE, SELECTION_VALUES_PROPERTY, selectionValues, UNINITIALIZED_VALUE, value, VALUE_PROPERTY, WANTS_INPUT_PROPERTY, wantsInput, WARNING_MESSAGE, YES_NO_CANCEL_OPTION, YES_NO_OPTION, YES_OPTION |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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 | |
OptionPane()
Creates a OptionPane with a test message. |
|
OptionPane(java.lang.Object message)
Creates a instance of OptionPane to display a
message using the
plain-message message type and the default options delivered by
the UI. |
|
OptionPane(java.lang.Object message,
int messageType)
Creates an instance of OptionPane to display a message
with the specified message type and the default options, |
|
OptionPane(java.lang.Object message,
int messageType,
int optionType)
Creates an instance of OptionPane to display a message
with the specified message type and options. |
|
OptionPane(java.lang.Object message,
int messageType,
int optionType,
javax.swing.Icon icon)
Creates an instance of OptionPane to display a message
with the specified message type, options, and icon. |
|
OptionPane(java.lang.Object message,
int messageType,
int optionType,
javax.swing.Icon icon,
java.lang.Object[] options)
Creates an instance of OptionPane to display a message
with the specified message type, icon, and options.
|
|
OptionPane(java.lang.Object message,
int messageType,
int optionType,
javax.swing.Icon icon,
java.lang.Object[] options,
java.lang.Object initialValue)
Creates an instance of OptionPane to display a message
with the specified message type, icon, and options, with the
initially-selected option specified. |
|
| Method Summary | |
static int |
showConfirmDialog(java.awt.Component parentComponent,
java.lang.Object message,
java.lang.String title,
int optionType,
int messageType,
javax.swing.Icon icon,
java.lang.String dontShowMessage,
java.awt.event.ItemListener itemListener)
Brings up a dialog with a specified icon, where the number of choices is determined by the optionType parameter.
|
static int |
showConfirmDialog(java.awt.Component parentComponent,
java.lang.Object message,
java.lang.String title,
int optionType,
int messageType,
java.lang.String dontShowMessage,
java.awt.event.ItemListener itemListener)
Brings up a dialog where the number of choices is determined by the optionType parameter, where the
messageType
parameter determines the icon to display.
|
static int |
showConfirmDialog(java.awt.Component parentComponent,
java.lang.Object message,
java.lang.String title,
int optionType,
java.lang.String dontShowMessage,
java.awt.event.ItemListener itemListener)
Brings up a dialog where the number of choices is determined by the optionType parameter. |
static void |
showMessageDialog(java.awt.Component parentComponent,
java.lang.Object message,
java.lang.String title,
int messageType,
javax.swing.Icon icon,
java.lang.String dontShowMessage,
java.awt.event.ItemListener itemListener)
Brings up a dialog displaying a message, specifying all parameters. |
static void |
showMessageDialog(java.awt.Component parentComponent,
java.lang.Object message,
java.lang.String title,
int messageType,
java.lang.String dontShowMessage,
java.awt.event.ItemListener itemListener)
Brings up a dialog that displays a message using a default icon determined by the messageType parameter. |
static int |
showOptionDialog(java.awt.Component parentComponent,
java.lang.Object message,
java.lang.String title,
int optionType,
int messageType,
javax.swing.Icon icon,
java.lang.Object[] options,
java.lang.Object initialValue,
java.lang.String dontShowMessage,
java.awt.event.ItemListener itemListener)
Brings up a dialog with a specified icon, where the initial choice is determined by the initialValue parameter and
the number of choices is determined by the optionType
parameter.
|
| 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, paramString, selectInitialValue, setIcon, setInitialSelectionValue, setInitialValue, setInputValue, setMessage, 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, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, 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, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, 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, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, 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, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public OptionPane()
OptionPane with a test message.
public OptionPane(java.lang.Object message)
OptionPane to display a
message using the
plain-message message type and the default options delivered by
the UI.
message - the Object to display
public OptionPane(java.lang.Object message,
int messageType)
OptionPane to display a message
with the specified message type and the default options,
message - the Object to displaymessageType - the type of message to be displayed:
ERROR_MESSAGE,
INFORMATION_MESSAGE,
WARNING_MESSAGE,
QUESTION_MESSAGE,
or PLAIN_MESSAGE
public OptionPane(java.lang.Object message,
int messageType,
int optionType)
OptionPane to display a message
with the specified message type and options.
message - the Object to displaymessageType - the type of message to be displayed:
ERROR_MESSAGE,
INFORMATION_MESSAGE,
WARNING_MESSAGE,
QUESTION_MESSAGE,
or PLAIN_MESSAGEoptionType - the options to display in the pane:
DEFAULT_OPTION, YES_NO_OPTION,
YES_NO_CANCEL_OPTION,
OK_CANCEL_OPTION
public OptionPane(java.lang.Object message,
int messageType,
int optionType,
javax.swing.Icon icon)
OptionPane to display a message
with the specified message type, options, and icon.
message - the Object to displaymessageType - the type of message to be displayed:
ERROR_MESSAGE,
INFORMATION_MESSAGE,
WARNING_MESSAGE,
QUESTION_MESSAGE,
or PLAIN_MESSAGEoptionType - the options to display in the pane:
DEFAULT_OPTION, YES_NO_OPTION,
YES_NO_CANCEL_OPTION,
OK_CANCEL_OPTIONicon - the Icon image to display
public OptionPane(java.lang.Object message,
int messageType,
int optionType,
javax.swing.Icon icon,
java.lang.Object[] options)
OptionPane to display a message
with the specified message type, icon, and options.
None of the options is initially selected.
The options objects should contain either instances of
Components, (which are added directly) or
Strings (which are wrapped in a JButton).
If you provide Components, you must ensure that when the
Component is clicked it messages setValue
in the created OptionPane.
message - the Object to displaymessageType - the type of message to be displayed:
ERROR_MESSAGE,
INFORMATION_MESSAGE,
WARNING_MESSAGE,
QUESTION_MESSAGE,
or PLAIN_MESSAGEoptionType - the options to display in the pane:
DEFAULT_OPTION,
YES_NO_OPTION,
YES_NO_CANCEL_OPTION,
OK_CANCEL_OPTIONicon - the Icon image to displayoptions - the choices the user can select
public OptionPane(java.lang.Object message,
int messageType,
int optionType,
javax.swing.Icon icon,
java.lang.Object[] options,
java.lang.Object initialValue)
OptionPane to display a message
with the specified message type, icon, and options, with the
initially-selected option specified.
message - the Object to displaymessageType - the type of message to be displayed:
ERROR_MESSAGE,
INFORMATION_MESSAGE,
WARNING_MESSAGE,
QUESTION_MESSAGE,
or PLAIN_MESSAGEoptionType - the options to display in the pane:
DEFAULT_OPTION,
YES_NO_OPTION,
YES_NO_CANCEL_OPTION,
OK_CANCEL_OPTIONicon - the Icon image to displayoptions - the choices the user can selectinitialValue - the choice that is initially selected; if
null, then nothing will be initially selected;
only meaningful if options is used| Method Detail |
public static int showOptionDialog(java.awt.Component parentComponent,
java.lang.Object message,
java.lang.String title,
int optionType,
int messageType,
javax.swing.Icon icon,
java.lang.Object[] options,
java.lang.Object initialValue,
java.lang.String dontShowMessage,
java.awt.event.ItemListener itemListener)
throws java.awt.HeadlessException
initialValue parameter and
the number of choices is determined by the optionType
parameter.
If optionType is YES_NO_OPTION,
or YES_NO_CANCEL_OPTION
and the options parameter is null,
then the options are
supplied by the look and feel.
The messageType parameter is primarily used to supply
a default icon from the look and feel.
parentComponent - determines the Frame
in which the dialog is displayed; if
null, or if the
parentComponent has no
Frame, a
default Frame is usedmessage - the Object to displaytitle - the title string for the dialogoptionType - an integer designating the options available on the
dialog: YES_NO_OPTION,
or YES_NO_CANCEL_OPTIONmessageType - an integer 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_MESSAGEicon - the icon to display in the dialogoptions - 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 FeelinitialValue - the object that represents the default selection
for the dialog; only meaningful if options
is used; can be nulldontShowMessage - The message to be display close to the checkbox
that disbles the dialog next time.itemListener - ItemListener for the dontShowMessage checkbox.
CLOSED_OPTION if the user closed
the dialog
java.awt.HeadlessException - if
GraphicsEnvironment.isHeadless returns
trueGraphicsEnvironment.isHeadless()
public static int showConfirmDialog(java.awt.Component parentComponent,
java.lang.Object message,
java.lang.String title,
int optionType,
java.lang.String dontShowMessage,
java.awt.event.ItemListener itemListener)
throws java.awt.HeadlessException
optionType parameter.
parentComponent - determines the Frame in which the
dialog is displayed; if null,
or if the parentComponent has no
Frame, a
default Frame is usedmessage - the Object to displaytitle - the title string for the dialogoptionType - an int designating the options available on the dialog:
YES_NO_OPTION, or
YES_NO_CANCEL_OPTIONdontShowMessage - The message to be display close to the checkbox
that disbles the dialog next time.itemListener - ItemListener for the dontShowMessage checkbox.
java.awt.HeadlessException - if
GraphicsEnvironment.isHeadless returns
trueGraphicsEnvironment.isHeadless()
public static int showConfirmDialog(java.awt.Component parentComponent,
java.lang.Object message,
java.lang.String title,
int optionType,
int messageType,
java.lang.String dontShowMessage,
java.awt.event.ItemListener itemListener)
throws java.awt.HeadlessException
optionType parameter, where the
messageType
parameter determines the icon to display.
The messageType parameter is primarily used to supply
a default icon from the Look and Feel.
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 displaytitle - the title string for the dialogoptionType - an integer designating the options available
on the dialog: YES_NO_OPTION,
or YES_NO_CANCEL_OPTIONmessageType - an integer 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_MESSAGEdontShowMessage - The message to be display close to the checkbox
that disbles the dialog next time.itemListener - ItemListener for the dontShowMessage checkbox.
java.awt.HeadlessException - if
GraphicsEnvironment.isHeadless returns
trueGraphicsEnvironment.isHeadless()
public static int showConfirmDialog(java.awt.Component parentComponent,
java.lang.Object message,
java.lang.String title,
int optionType,
int messageType,
javax.swing.Icon icon,
java.lang.String dontShowMessage,
java.awt.event.ItemListener itemListener)
throws java.awt.HeadlessException
optionType parameter.
The messageType parameter is primarily used to supply
a default icon from the look and feel.
parentComponent - determines the Frame in which the
dialog is displayed; if null,
or if the parentComponent has no
Frame, a
default Frame is usedmessage - the Object to displaytitle - the title string for the dialogoptionType - an int designating the options available on the dialog:
YES_NO_OPTION,
or YES_NO_CANCEL_OPTIONmessageType - 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_MESSAGEicon - the icon to display in the dialogdontShowMessage - The message to be display close to the checkbox
that disbles the dialog next time.itemListener - ItemListener for the dontShowMessage checkbox.
java.awt.HeadlessException - if
GraphicsEnvironment.isHeadless returns
trueGraphicsEnvironment.isHeadless()
public static void showMessageDialog(java.awt.Component parentComponent,
java.lang.Object message,
java.lang.String title,
int messageType,
java.lang.String dontShowMessage,
java.awt.event.ItemListener itemListener)
throws java.awt.HeadlessException
messageType parameter.
parentComponent - determines the Frame
in which the dialog is displayed; if null,
or if the parentComponent has no
Frame, a default Frame is usedmessage - the Object to displaytitle - the title string for the dialogmessageType - the type of message to be displayed:
ERROR_MESSAGE,
INFORMATION_MESSAGE,
WARNING_MESSAGE,
QUESTION_MESSAGE,
or PLAIN_MESSAGEdontShowMessage - The message to be display close to the checkbox
that disbles the dialog next time.itemListener - ItemListener for the dontShowMessage checkbox.
java.awt.HeadlessException - if
GraphicsEnvironment.isHeadless returns
trueGraphicsEnvironment.isHeadless()
public static void showMessageDialog(java.awt.Component parentComponent,
java.lang.Object message,
java.lang.String title,
int messageType,
javax.swing.Icon icon,
java.lang.String dontShowMessage,
java.awt.event.ItemListener itemListener)
throws java.awt.HeadlessException
parentComponent - determines the Frame in which the
dialog is displayed; if null,
or if the parentComponent has no
Frame, a
default Frame is usedmessage - the Object to displaytitle - the title string for the dialogmessageType - the type of message to be displayed:
ERROR_MESSAGE,
INFORMATION_MESSAGE,
WARNING_MESSAGE,
QUESTION_MESSAGE,
or PLAIN_MESSAGEicon - an icon to display in the dialog that helps the user
identify the kind of message that is being displayeddontShowMessage - The message to be display close to the checkbox
that disbles the dialog next time.itemListener - ItemListener for the dontShowMessage checkbox.
java.awt.HeadlessException - if
GraphicsEnvironment.isHeadless returns
trueGraphicsEnvironment.isHeadless()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||