public class Dialog
extends java.awt.Dialog
Dialog class produces a dialog - a window that takes
input from the user. The default layout for a dialog is
BorderLayout.
If the JDK has the sun.awt.windows.WWindowPeer#getFocusPeer()
bug (the JDK for Windows 95/NT version 1.1.4 or before), an application
that uses the jp.kyasu.awt package should use this class
instead of java.awt.Dialog.
Because of this bug, if a lightwight component is focus traversable, an application will be hung up.
Dialog,
AWTResources.HAS_FOCUS_BUG,
直列化された形式java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType| 修飾子とタイプ | フィールドと説明 |
|---|---|
static int |
CONFIRM
The confirm message type.
|
protected static int |
DEFAULT_COLUMNS
The default columns of the text field for the request methods.
|
static int |
ERROR
The error message type.
|
protected static VImage |
ERROR_ICON |
static int |
INFORM
The inform message type.
|
protected static VImage |
INFORM_ICON |
protected static java.lang.String |
KFC_Copyright |
protected static java.lang.String |
KFC_Permission |
static int |
MESSAGE
The normal message type.
|
protected static VImage |
QUESTION_ICON |
protected static Visualizable |
V_KFC_Copyright |
static int |
WARN
The warn message type.
|
protected static VImage |
WARN_ICON |
| コンストラクタと説明 |
|---|
Dialog(java.awt.Frame parent)
Constructs an initially invisible Dialog with an empty title.
|
Dialog(java.awt.Frame parent,
boolean modal)
Constructs an initially invisible Dialog with an empty title.
|
Dialog(java.awt.Frame parent,
java.lang.String title)
Constructs an initially invisible Dialog with a title.
|
Dialog(java.awt.Frame parent,
java.lang.String title,
boolean modal)
Constructs an initially invisible Dialog with a title.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
static java.lang.Object |
choice(int type,
java.awt.Frame frame,
java.lang.String title,
java.lang.String message,
java.lang.String[] labels,
java.lang.Object[] values,
int defaultIndex)
Prompts a user to select a value from the specified values with a dialog.
|
static java.lang.Object |
choice(int type,
java.awt.Frame frame,
java.lang.String title,
Visualizable message,
java.lang.String[] labels,
java.lang.Object[] values,
int defaultIndex)
Prompts a user to select a value from the specified values with a dialog.
|
static boolean |
confirm(java.awt.Frame frame,
java.lang.String message)
Prompts a user to confirm the specified message with a dialog.
|
static boolean |
confirm(java.awt.Frame frame,
Visualizable message)
Prompts a user to confirm the specified message with a dialog.
|
static boolean |
confirm(java.lang.String message)
Prompts a user to confirm the specified message with a dialog.
|
static boolean |
confirm(Visualizable message)
Prompts a user to confirm the specified message with a dialog.
|
protected static Visualizable |
createVisualizable(java.lang.String message)
Creates the visual object from the specified message.
|
static void |
error(java.awt.Frame frame,
java.lang.String message)
Errors a user with a dialog.
|
static void |
error(java.awt.Frame frame,
Visualizable message)
Errors a user with a dialog.
|
static void |
error(java.lang.String message)
Errors a user with a dialog.
|
static void |
error(Visualizable message)
Errors a user with a dialog.
|
VImage |
getErrorIcon()
Returns the error icon.
|
java.awt.Component |
getFocusOwner()
Returns the child component of this Window which has focus if and
only if this Window is active.
|
protected java.awt.Component |
getFocusRequestComponent(java.awt.Component c)
Returns the component that requests the focus.
|
VImage |
getInformIcon()
Returns the information icon.
|
VImage |
getQuestionIcon()
Returns the question icon.
|
VImage |
getWarnIcon()
Returns the warning icon.
|
static void |
inform(java.awt.Frame frame,
java.lang.String message)
Informs a user with a dialog.
|
static void |
inform(java.awt.Frame frame,
Visualizable message)
Informs a user with a dialog.
|
static void |
inform(java.lang.String message)
Informs a user with a dialog.
|
static void |
inform(Visualizable message)
Informs a user with a dialog.
|
static void |
main(java.lang.String[] arg)
Executes the examples.
|
static void |
message(java.awt.Frame frame,
java.lang.String message)
Shows the message with a dialog.
|
static void |
message(java.awt.Frame frame,
java.lang.String label,
java.lang.String message)
Shows the message with a dialog.
|
static void |
message(java.awt.Frame frame,
java.lang.String label,
Visualizable message)
Shows the message with a dialog.
|
static void |
message(java.awt.Frame frame,
Visualizable message)
Shows the message with a dialog.
|
static void |
message(java.lang.String message)
Shows the message with a dialog.
|
static void |
message(Visualizable message)
Shows the message with a dialog.
|
static java.lang.String |
request(java.awt.Frame frame,
java.lang.String message)
Prompts a user to input a string with a dialog.
|
static java.lang.String |
request(java.awt.Frame frame,
java.lang.String message,
int columns)
Prompts a user to input a string with a dialog.
|
static java.lang.String |
request(java.awt.Frame frame,
java.lang.String message,
java.lang.String initialStr)
Prompts a user to input a string with a dialog.
|
static java.lang.String |
request(java.awt.Frame frame,
java.lang.String message,
java.lang.String initialStr,
int columns)
Prompts a user to input a string with a dialog.
|
static java.lang.String |
request(java.lang.String message)
Prompts a user to input a string with a dialog.
|
static java.lang.String |
request(java.lang.String message,
int columns)
Prompts a user to input a string with a dialog.
|
static java.lang.String |
request(java.lang.String message,
java.lang.String initialStr)
Prompts a user to input a string with a dialog.
|
static java.lang.String |
request(java.lang.String message,
java.lang.String initialStr,
int columns)
Prompts a user to input a string with a dialog.
|
void |
show()
Shows the dialog.
|
static void |
showKFCCopyright()
Shows the KFC copyright message with a dialog.
|
static void |
showKFCCopyright(java.awt.Frame frame)
Shows the KFC copyright message with a dialog.
|
void |
update(java.awt.Graphics g)
Updates this component.
|
static void |
warn(java.awt.Frame frame,
java.lang.String message)
Warns a user with a dialog.
|
static void |
warn(java.awt.Frame frame,
Visualizable message)
Warns a user with a dialog.
|
static void |
warn(java.lang.String message)
Warns a user with a dialog.
|
static void |
warn(Visualizable message)
Warns a user with a dialog.
|
addNotify, getAccessibleContext, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, paramString, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, toBackaddPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFrontadd, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprotected static VImage INFORM_ICON
protected static VImage WARN_ICON
protected static VImage QUESTION_ICON
protected static VImage ERROR_ICON
protected static final int DEFAULT_COLUMNS
public static final int MESSAGE
public static final int INFORM
public static final int WARN
public static final int ERROR
public static final int CONFIRM
protected static java.lang.String KFC_Copyright
protected static java.lang.String KFC_Permission
protected static Visualizable V_KFC_Copyright
public Dialog(java.awt.Frame parent)
parent - the owner of the dialog.public Dialog(java.awt.Frame parent,
boolean modal)
parent - the owner of the dialog.modal - if true, dialog blocks input to the parent window when
shown.public Dialog(java.awt.Frame parent,
java.lang.String title)
parent - the owner of the dialog.title - the title of the dialog.public Dialog(java.awt.Frame parent,
java.lang.String title,
boolean modal)
parent - the owner of the dialog.title - the title of the dialog.modal - if true, dialog blocks input to the parent window when
shown.public VImage getInformIcon()
public VImage getWarnIcon()
public VImage getQuestionIcon()
public VImage getErrorIcon()
public static java.lang.String request(java.lang.String message)
message - the message string shown in the dialog.public static java.lang.String request(java.lang.String message,
java.lang.String initialStr)
message - the message string shown in the dialog.initialStr - the initial inputted string.public static java.lang.String request(java.lang.String message,
int columns)
message - the message string shown in the dialog.columns - the columns for the input text field.public static java.lang.String request(java.lang.String message,
java.lang.String initialStr,
int columns)
message - the message string shown in the dialog.initialStr - the initial inputted string.columns - the columns for the input text field.public static java.lang.String request(java.awt.Frame frame,
java.lang.String message)
frame - the owner of the dialog.message - the message string shown in the dialog.public static java.lang.String request(java.awt.Frame frame,
java.lang.String message,
java.lang.String initialStr)
frame - the owner of the dialog.message - the message string shown in the dialog.initialStr - the initial inputted string.public static java.lang.String request(java.awt.Frame frame,
java.lang.String message,
int columns)
frame - the owner of the dialog.message - the message string shown in the dialog.columns - the columns for the input text field.public static java.lang.String request(java.awt.Frame frame,
java.lang.String message,
java.lang.String initialStr,
int columns)
frame - the owner of the dialog.message - the message string shown in the dialog.initialStr - the initial inputted string.columns - the columns for the input text field.public static void message(java.lang.String message)
message - the message string shown in the dialog.public static void message(Visualizable message)
message - the visual message shown in the dialog.public static void message(java.awt.Frame frame,
java.lang.String message)
frame - the owner of the dialog.message - the message string shown in the dialog.public static void message(java.awt.Frame frame,
java.lang.String label,
java.lang.String message)
frame - the owner of the dialog.label - the label of the dialog.message - the message string shown in the dialog.public static void message(java.awt.Frame frame,
Visualizable message)
frame - the owner of the dialog.message - the visual message shown in the dialog.public static void message(java.awt.Frame frame,
java.lang.String label,
Visualizable message)
frame - the owner of the dialog.label - the label of the dialog.message - the visual message shown in the dialog.public static void inform(java.lang.String message)
message - the message string shown in the dialog.public static void inform(Visualizable message)
message - the visual message shown in the dialog.public static void inform(java.awt.Frame frame,
java.lang.String message)
frame - the owner of the dialog.message - the message string shown in the dialog.public static void inform(java.awt.Frame frame,
Visualizable message)
frame - the owner of the dialog.message - the visual message shown in the dialog.public static void warn(java.lang.String message)
message - the message string shown in the dialog.public static void warn(Visualizable message)
message - the visual message shown in the dialog.public static void warn(java.awt.Frame frame,
java.lang.String message)
frame - the owner of the dialog.message - the message string shown in the dialog.public static void warn(java.awt.Frame frame,
Visualizable message)
frame - the owner of the dialog.message - the visual message shown in the dialog.public static void error(java.lang.String message)
message - the message string shown in the dialog.public static void error(Visualizable message)
message - the visual message shown in the dialog.public static void error(java.awt.Frame frame,
java.lang.String message)
frame - the owner of the dialog.message - the message string shown in the dialog.public static void error(java.awt.Frame frame,
Visualizable message)
frame - the owner of the dialog.message - the visual message shown in the dialog.public static boolean confirm(java.lang.String message)
message - the message string shown in the dialog.true if confirmed, or false otherwise.public static boolean confirm(Visualizable message)
message - the visual message shown in the dialog.true if confirmed, or false otherwise.public static boolean confirm(java.awt.Frame frame,
java.lang.String message)
frame - the owner of the dialog.message - the message string shown in the dialog.true if confirmed, or false otherwise.public static boolean confirm(java.awt.Frame frame,
Visualizable message)
frame - the owner of the dialog.message - the visual message shown in the dialog.true if confirmed, or false otherwise.public static java.lang.Object choice(int type,
java.awt.Frame frame,
java.lang.String title,
java.lang.String message,
java.lang.String[] labels,
java.lang.Object[] values,
int defaultIndex)
type - the dialog type.frame - the owner of the dialog.title - the title of the dialog.message - the message string shown in the dialog.labels - the labels associated with the values.values - the values.defaultIndex - the default selected index of the values.public static java.lang.Object choice(int type,
java.awt.Frame frame,
java.lang.String title,
Visualizable message,
java.lang.String[] labels,
java.lang.Object[] values,
int defaultIndex)
type - the dialog type.frame - the owner of the dialog.title - the title of the dialog.message - the visual message shown in the dialog.labels - the labels associated with the values.values - the values.defaultIndex - the default selected index of the values.public static void showKFCCopyright()
public static void showKFCCopyright(java.awt.Frame frame)
frame - the owner of the dialog.protected static Visualizable createVisualizable(java.lang.String message)
public void update(java.awt.Graphics g)
update クラス内 java.awt.Containerpublic java.awt.Component getFocusOwner()
getFocusOwner クラス内 java.awt.WindowAWTResources.HAS_FOCUS_BUGpublic void show()
show クラス内 java.awt.Dialogprotected java.awt.Component getFocusRequestComponent(java.awt.Component c)
public static void main(java.lang.String[] arg)