Class JOptionPane
java.lang.Object
vaadinx.awt.Component
vaadinx.awt.Container
vaadinx.swing.JComponent
vaadinx.swing.JOptionPane
- All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Emulator for
JOptionPane. Emulator-only per SD_no_sjoptionpane — no surrogate.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intprotected Iconstatic final Stringstatic final intstatic final Stringstatic final Stringprotected Objectprotected Objectstatic final Stringprotected Objectprotected Objectstatic final Stringstatic final Stringprotected intstatic final intstatic final intstatic final intstatic final Stringprotected Object[]static final Stringprotected intstatic final intstatic final intstatic final Stringprotected Object[]static final ObjectJDK sentinel marking "no value chosen yet" — distinct from null (which is a legitimate user-set value).protected Objectstatic final Stringstatic final Stringprotected booleanstatic final intstatic final intstatic final intstatic final intFields inherited from class JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, FILL_CHROME, FILL_DEFAULT, LEFT_ALIGNMENT, listenerList, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionJOptionPane(Object message) JOptionPane(Object message, int messageType) JOptionPane(Object message, int messageType, int optionType) JOptionPane(Object message, int messageType, int optionType, Icon icon) JOptionPane(Object message, int messageType, int optionType, Icon icon, Object[] options) JOptionPane(Object message, int messageType, int optionType, Icon icon, Object[] options, Object initialValue) -
Method Summary
Modifier and TypeMethodDescriptioncreateDialog(Component parentComponent, String title) Build a modalJDialoghosting this pane, owned by the window ancestor ofparentComponent(or by no owner ifparentComponentis null / not in a window).createInternalFrame(Component parent, String title) getIcon()intObject[]intstatic FrameObject[]getValue()booleanprotected StringvoidvoidvoidsetInitialSelectionValue(Object newValue) voidsetInitialValue(Object newInitialValue) voidsetInputValue(Object newValue) voidsetMessage(Object newMessage) voidsetMessageType(int newType) voidsetOptions(Object[] newOptions) voidsetOptionType(int newType) voidsetSelectionValues(Object[] newValues) voidvoidsetWantsInput(boolean newValue) static intshowConfirmDialog(Component parent, Object message) static intshowConfirmDialog(Component parent, Object message, String title, int optionType) static intshowConfirmDialog(Component parent, Object message, String title, int optionType, int messageType) static intshowConfirmDialog(Component parent, Object message, String title, int optionType, int messageType, Icon icon) static StringshowInputDialog(Object message) static StringshowInputDialog(Object message, Object initialSelectionValue) static StringshowInputDialog(Component parent, Object message) static StringshowInputDialog(Component parent, Object message, Object initialSelectionValue) static StringshowInputDialog(Component parent, Object message, String title, int messageType) static ObjectshowInputDialog(Component parent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSelectionValue) static intshowInternalConfirmDialog(Component parent, Object message) static StringshowInternalInputDialog(Component parent, Object message) static voidshowInternalMessageDialog(Component parent, Object message) static intshowInternalOptionDialog(Component parent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue) static voidshowMessageDialog(Component parent, Object message) static voidshowMessageDialog(Component parent, Object message, String title, int messageType) static voidshowMessageDialog(Component parent, Object message, String title, int messageType, Icon icon) static intshowOptionDialog(Component parent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue) Methods inherited from class JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUI, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUIMethods inherited from class Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, addSlotChild, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, fireHierarchyEvent, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, peerContentElement, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeSlotChild, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeMethods inherited from class Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, applyBackgroundToPeer, applyVisibleToPeer, awtListeners, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, defaultFillCssClass, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, fireComponentEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isThemeDefault, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, peerIs, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, suppressMouseBridge, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, withPeer, withPeerOnLiveUI
-
Field Details
-
ERROR_MESSAGE
public static final int ERROR_MESSAGE- See Also:
-
INFORMATION_MESSAGE
public static final int INFORMATION_MESSAGE- See Also:
-
WARNING_MESSAGE
public static final int WARNING_MESSAGE- See Also:
-
QUESTION_MESSAGE
public static final int QUESTION_MESSAGE- See Also:
-
PLAIN_MESSAGE
public static final int PLAIN_MESSAGE- See Also:
-
DEFAULT_OPTION
public static final int DEFAULT_OPTION- See Also:
-
YES_NO_OPTION
public static final int YES_NO_OPTION- See Also:
-
YES_NO_CANCEL_OPTION
public static final int YES_NO_CANCEL_OPTION- See Also:
-
OK_CANCEL_OPTION
public static final int OK_CANCEL_OPTION- See Also:
-
YES_OPTION
public static final int YES_OPTION- See Also:
-
NO_OPTION
public static final int NO_OPTION- See Also:
-
CANCEL_OPTION
public static final int CANCEL_OPTION- See Also:
-
OK_OPTION
public static final int OK_OPTION- See Also:
-
CLOSED_OPTION
public static final int CLOSED_OPTION- See Also:
-
ICON_PROPERTY
- See Also:
-
MESSAGE_PROPERTY
- See Also:
-
VALUE_PROPERTY
- See Also:
-
OPTIONS_PROPERTY
- See Also:
-
INITIAL_VALUE_PROPERTY
- See Also:
-
MESSAGE_TYPE_PROPERTY
- See Also:
-
OPTION_TYPE_PROPERTY
- See Also:
-
SELECTION_VALUES_PROPERTY
- See Also:
-
INITIAL_SELECTION_VALUE_PROPERTY
- See Also:
-
INPUT_VALUE_PROPERTY
- See Also:
-
WANTS_INPUT_PROPERTY
- See Also:
-
UNINITIALIZED_VALUE
JDK sentinel marking "no value chosen yet" — distinct from null (which is a legitimate user-set value). -
message
-
messageType
protected int messageType -
optionType
protected int optionType -
icon
-
options
-
initialValue
-
value
-
selectionValues
-
initialSelectionValue
-
inputValue
-
wantsInput
protected boolean wantsInput
-
-
Constructor Details
-
JOptionPane
public JOptionPane() -
JOptionPane
-
JOptionPane
-
JOptionPane
-
JOptionPane
-
JOptionPane
-
JOptionPane
-
-
Method Details
-
setMessage
-
getMessage
-
setIcon
-
getIcon
-
setValue
-
getValue
-
setOptions
-
getOptions
-
setInitialValue
-
getInitialValue
-
setMessageType
public void setMessageType(int newType) -
getMessageType
public int getMessageType() -
setOptionType
public void setOptionType(int newType) -
getOptionType
public int getOptionType() -
setSelectionValues
-
getSelectionValues
-
setInitialSelectionValue
-
getInitialSelectionValue
-
setInputValue
-
getInputValue
-
setWantsInput
public void setWantsInput(boolean newValue) -
getWantsInput
public boolean getWantsInput() -
createDialog
Build a modalJDialoghosting this pane, owned by the window ancestor ofparentComponent(or by no owner ifparentComponentis null / not in a window).The returned dialog is configured per JDK contract: APPLICATION_MODAL, DISPOSE_ON_CLOSE, non-resizable. Its content pane carries this JOptionPane as its sole child; the pane's children (icon row, optional input, button row) are rebuilt on each
createDialogcall so reused panes pick up state mutations between shows. -
selectInitialValue
public void selectInitialValue() -
showMessageDialog
-
showMessageDialog
-
showMessageDialog
-
showConfirmDialog
-
showConfirmDialog
-
showConfirmDialog
-
showConfirmDialog
-
showInputDialog
-
showInputDialog
-
showInputDialog
-
showInputDialog
-
showInputDialog
-
showInputDialog
-
showOptionDialog
-
showInternalMessageDialog
-
showInternalConfirmDialog
-
showInternalInputDialog
-
showInternalOptionDialog
-
createInternalFrame
-
getRootFrame
-
getAccessibleContext
- Specified by:
getAccessibleContextin interfaceAccessible- Overrides:
getAccessibleContextin classComponent
-
getUIClassID
- Overrides:
getUIClassIDin classJComponent
-
paramString
- Overrides:
paramStringin classJComponent
-