public class OptionDialog extends JOptionPane implements OptionChooser
JOptionPane.AccessibleJOptionPaneJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
static boolean |
useDialogForPrompt |
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_OPTIONlistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTERROR, INFORMATION, QUESTION, UNCATEGORISED, WARNINGABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
OptionDialog(int type,
Object text,
Option[] choices,
Option defaultChoice,
OptionCallback callback) |
OptionDialog(int type,
Object text,
Option[] choices,
Option defaultChoice,
OptionCallback callback,
Component buttonBarAccessory,
Icon icon) |
OptionDialog(int type,
Object text,
Option[] choices,
Option defaultChoice,
OptionCallback callback,
Icon icon) |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
appendException(Throwable exception,
int level,
StringBuffer buf,
boolean details) |
void |
choice(Option choice) |
Option |
dialogPrompt(Component parent,
String title) |
Option |
dialogPrompt(Component parent,
String title,
Dimension size) |
Option |
dialogPrompt(Component parent,
String title,
Image frameImage,
int position) |
Option |
dialogPrompt(Component parent,
String title,
Image frameImage,
int position,
Dimension size) |
static void |
error(Component parent,
String title,
String message)
Show an error message with detail
|
static void |
error(Component parent,
String title,
String mesg,
Throwable exception)
Show an error message with toggle-able detail
|
static Option |
error(Component parent,
String title,
String mesg,
Throwable exception,
Option[] options,
Option defaultChoice)
Show an error message with toggle-able detail
|
static void |
error(Component parent,
String title,
Throwable exception)
Show an error message with detail
|
Component |
getComponent() |
static void |
info(Component parent,
String title,
String message) |
boolean |
isDismissed() |
static void |
main(String[] args) |
static Option |
prompt(Component parent,
int type,
String title,
Object text,
Option[] choices,
Option defaultChoice) |
static Option |
prompt(Component parent,
int type,
String title,
Object text,
Option[] choices,
Option defaultChoice,
OptionCallback callback) |
static Option |
prompt(Component parent,
int type,
String title,
Object text,
Option[] choices,
Option defaultChoice,
OptionCallback callback,
Component buttonBarAccesory,
Icon icon,
boolean selectInitialValue,
Dimension size) |
static Option |
prompt(Component parent,
int type,
String title,
Object text,
Option[] choices,
Option defaultChoice,
OptionCallback callback,
Icon icon) |
static Option |
prompt(Component parent,
int type,
String title,
Object text,
Option[] choices,
Option defaultChoice,
OptionCallback callback,
Icon icon,
Dimension size) |
static char[] |
promptForAuthentication(Component parent,
String title) |
static char[] |
promptForAuthentication(Component parent,
String title,
String label) |
static String |
promptForText(Component parent,
String title,
String defaultText,
Component accessory,
char echoCharacter,
String label) |
static String |
promptForText(Component parent,
String title,
String defaultText,
Component accessory,
char echoCharacter,
String label,
int textWidth,
String accesoryPosition) |
void |
selectInitialValue() |
void |
setValue(Object newValue) |
createDialog, createDialog, createInternalFrame, getAccessibleContext, getDesktopPaneForComponent, getFrameForComponent, getIcon, getInitialSelectionValue, getInitialValue, getInputValue, getMaxCharactersPerLineCount, getMessage, getMessageType, getOptions, getOptionType, getRootFrame, getSelectionValues, getUI, getUIClassID, getValue, getWantsInput, paramString, setIcon, setInitialSelectionValue, setInitialValue, setInputValue, setMessage, setMessageType, setOptions, setOptionType, setRootFrame, setSelectionValues, setUI, 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, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, 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, 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, processKeyEvent, processMouseEvent, processMouseMotionEvent, 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, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, 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, 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, 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, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic OptionDialog(int type,
Object text,
Option[] choices,
Option defaultChoice,
OptionCallback callback)
public OptionDialog(int type,
Object text,
Option[] choices,
Option defaultChoice,
OptionCallback callback,
Icon icon)
public void selectInitialValue()
selectInitialValue in class JOptionPanepublic void setValue(Object newValue)
setValue in class JOptionPanepublic static void main(String[] args)
public boolean isDismissed()
public void choice(Option choice)
public Option dialogPrompt(Component parent, String title, Image frameImage, int position)
public Option dialogPrompt(Component parent, String title, Image frameImage, int position, Dimension size)
public static char[] promptForAuthentication(Component parent, String title)
public static char[] promptForAuthentication(Component parent, String title, String label)
public static String promptForText(Component parent, String title, String defaultText, Component accessory, char echoCharacter, String label)
public static String promptForText(Component parent, String title, String defaultText, Component accessory, char echoCharacter, String label, int textWidth, String accesoryPosition)
public static Option prompt(Component parent, int type, String title, Object text, Option[] choices, Option defaultChoice)
public static Option prompt(Component parent, int type, String title, Object text, Option[] choices, Option defaultChoice, OptionCallback callback)
public static Option prompt(Component parent, int type, String title, Object text, Option[] choices, Option defaultChoice, OptionCallback callback, Icon icon)
public static Option prompt(Component parent, int type, String title, Object text, Option[] choices, Option defaultChoice, OptionCallback callback, Icon icon, Dimension size)
public static Option prompt(Component parent, int type, String title, Object text, Option[] choices, Option defaultChoice, OptionCallback callback, Component buttonBarAccesory, Icon icon, boolean selectInitialValue, Dimension size)
public static void error(Component parent, String title, Throwable exception)
parent - title - exception - public static void error(Component parent, String title, String message)
parent - title - exception - public static void error(Component parent, String title, String mesg, Throwable exception)
parent - mesg - title - exception - public static Option error(Component parent, String title, String mesg, Throwable exception, Option[] options, Option defaultChoice)
parent - mesg - title - exception - protected static void appendException(Throwable exception, int level, StringBuffer buf, boolean details)
public Component getComponent()
getComponent in interface OptionChooserCopyright © 2021. All rights reserved.