java.awt
Class Dialog
- Accessible, ImageObserver, MenuContainer, Serializable
Dialog
provides a top-level window normally used to receive
user input in applications.
A dialog always has another top-level window as owner and is only visible
if this owner is visible to the user. The default layout of dialogs is the
BorderLayout
. Dialogs can be modal (blocks user input to other
components) or non-modal (user input in other components are allowed).
Dialog(Dialog owner) - Initializes a new instance of
Dialog with the specified,
parent, that is resizable.
|
Dialog(Dialog owner, String title) - Initializes a new instance of
Dialog with the specified,
parent and title, that is resizable.
|
Dialog(Dialog owner, String title, boolean modal) - Initializes a new instance of
Dialog with the specified,
parent, title and modality, that is resizable.
|
Dialog(Dialog parent, String title, boolean modal, GraphicsConfiguration gc) - Initializes a new instance of
Dialog with the specified,
parent, title, modality and GraphicsConfiguration , that is
resizable.
|
Dialog(Frame parent) - Initializes a new instance of
Dialog with the specified
parent, that is resizable and not modal, and which has no title.
|
Dialog(Frame parent, boolean modal) - Initializes a new instance of
Dialog with the specified
parent and modality, that is resizable and which has no title.
|
Dialog(Frame parent, String title) - Initializes a new instance of
Dialog with the specified
parent, that is resizable and not modal, and which has the specified
title.
|
Dialog(Frame parent, String title, boolean modal) - Initializes a new instance of
Dialog with the specified,
parent, title, and modality, that is resizable.
|
Dialog(Frame parent, String title, boolean modal, GraphicsConfiguration gc) - Initializes a new instance of
Dialog with the specified,
parent, title, modality and GraphicsConfiguration , that is
resizable.
|
addNotify , addWindowFocusListener , addWindowListener , addWindowStateListener , applyResourceBundle , applyResourceBundle , createBufferStrategy , createBufferStrategy , dispose , extends EventListener> T[] getListeners , getAccessibleContext , getBufferStrategy , getFocusCycleRootAncestor , getFocusOwner , getFocusableWindowState , getGraphicsConfiguration , getLocale , getMostRecentFocusOwner , getOwnedWindows , getOwner , getToolkit , getWarningString , getWindowFocusListeners , getWindowListeners , getWindowStateListeners , isActive , isAlwaysOnTop , isFocusCycleRoot , isFocusableWindow , isFocused , isShowing , pack , postEvent , processEvent , processWindowEvent , processWindowFocusEvent , processWindowStateEvent , removeWindowFocusListener , removeWindowListener , removeWindowStateListener , setAlwaysOnTop , setCursor , setFocusCycleRoot , setFocusableWindowState , setLocationRelativeTo , toBack , toFront , void hide , void show |
add , add , add , add , add , addContainerListener , addImpl , addNotify , addPropertyChangeListener , addPropertyChangeListener , applyComponentOrientation , areFocusTraversalKeysSet , countComponents , deliverEvent , doLayout , extends EventListener> T[] getListeners , findComponentAt , findComponentAt , getAlignmentX , getAlignmentY , getComponent , getComponentAt , getComponentAt , getComponentCount , getComponentZOrder , getComponents , getContainerListeners , getFocusTraversalKeys , getFocusTraversalPolicy , getInsets , getLayout , getMaximumSize , getMinimumSize , getMousePosition , getPreferredSize , insets , invalidate , isAncestorOf , isFocusCycleRoot , isFocusCycleRoot , isFocusTraversalPolicyProvider , isFocusTraversalPolicySet , layout , list , list , locate , minimumSize , paint , paintComponents , paramString , preferredSize , print , printComponents , processContainerEvent , processEvent , remove , remove , removeAll , removeContainerListener , removeNotify , setComponentZOrder , setFocusCycleRoot , setFocusTraversalKeys , setFocusTraversalPolicy , setFocusTraversalPolicyProvider , setFont , setLayout , transferFocusDownCycle , update , validate , validateTree |
action , add , addComponentListener , addFocusListener , addHierarchyBoundsListener , addHierarchyListener , addInputMethodListener , addKeyListener , addMouseListener , addMouseMotionListener , addMouseWheelListener , addNotify , addPropertyChangeListener , addPropertyChangeListener , applyComponentOrientation , areFocusTraversalKeysSet , bounds , checkImage , checkImage , coalesceEvents , contains , contains , createImage , createImage , createVolatileImage , createVolatileImage , deliverEvent , disable , disableEvents , dispatchEvent , doLayout , enable , enable , enableEvents , enableInputMethods , extends EventListener> T[] getListeners , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , firePropertyChange , getAccessibleContext , getAlignmentX , getAlignmentY , getBackground , getBounds , getBounds , getColorModel , getComponentAt , getComponentAt , getComponentListeners , getComponentOrientation , getCursor , getDropTarget , getFocusCycleRootAncestor , getFocusListeners , getFocusTraversalKeys , getFocusTraversalKeysEnabled , getFont , getFontMetrics , getForeground , getGraphics , getGraphicsConfiguration , getHeight , getHierarchyBoundsListeners , getHierarchyListeners , getIgnoreRepaint , getInputContext , getInputMethodListeners , getInputMethodRequests , getKeyListeners , getLocale , getLocation , getLocation , getLocationOnScreen , getMaximumSize , getMinimumSize , getMouseListeners , getMouseMotionListeners , getMousePosition , getMouseWheelListeners , getName , getParent , getPeer , getPreferredSize , getPropertyChangeListeners , getPropertyChangeListeners , getSize , getSize , getToolkit , getTreeLock , getWidth , getX , getY , gotFocus , handleEvent , hasFocus , hide , imageUpdate , inside , invalidate , isBackgroundSet , isCursorSet , isDisplayable , isDoubleBuffered , isEnabled , isFocusCycleRoot , isFocusOwner , isFocusTraversable , isFocusable , isFontSet , isForegroundSet , isLightweight , isMaximumSizeSet , isMinimumSizeSet , isOpaque , isPreferredSizeSet , isShowing , isValid , isVisible , keyDown , keyUp , layout , list , list , list , list , list , locate , location , lostFocus , minimumSize , mouseDown , mouseDrag , mouseEnter , mouseExit , mouseMove , mouseUp , move , nextFocus , paint , paintAll , paramString , postEvent , preferredSize , prepareImage , prepareImage , print , printAll , processComponentEvent , processEvent , processFocusEvent , processHierarchyBoundsEvent , processHierarchyEvent , processInputMethodEvent , processKeyEvent , processMouseEvent , processMouseMotionEvent , processMouseWheelEvent , remove , removeComponentListener , removeFocusListener , removeHierarchyBoundsListener , removeHierarchyListener , removeInputMethodListener , removeKeyListener , removeMouseListener , removeMouseMotionListener , removeMouseWheelListener , removeNotify , removePropertyChangeListener , removePropertyChangeListener , repaint , repaint , repaint , repaint , requestFocus , requestFocus , requestFocusInWindow , requestFocusInWindow , reshape , resize , resize , setBackground , setBounds , setBounds , setComponentOrientation , setCursor , setDropTarget , setEnabled , setFocusTraversalKeys , setFocusTraversalKeysEnabled , setFocusable , setFont , setForeground , setIgnoreRepaint , setLocale , setLocation , setLocation , setMaximumSize , setMinimumSize , setName , setPreferredSize , setSize , setSize , setVisible , show , show , size , toString , transferFocus , transferFocusBackward , transferFocusUpCycle , update , validate |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
Dialog
public Dialog(Dialog owner)
Initializes a new instance of Dialog
with the specified,
parent, that is resizable.
owner
- The parent frame of this dialog box.
IllegalArgumentException
- If parent is null. This exception is
always thrown when GraphicsEnvironment.isHeadless() returns true.
Dialog
public Dialog(Dialog owner,
String title)
Initializes a new instance of Dialog
with the specified,
parent and title, that is resizable.
owner
- The parent frame of this dialog box.title
- The title string for this dialog box.
IllegalArgumentException
- If parent is null. This exception is
always thrown when GraphicsEnvironment.isHeadless() returns
true.
Dialog
public Dialog(Dialog owner,
String title,
boolean modal)
Initializes a new instance of Dialog
with the specified,
parent, title and modality, that is resizable.
owner
- The parent frame of this dialog box.title
- The title string for this dialog box.modal
- true
if this dialog box is modal,
false
otherwise.
IllegalArgumentException
- If parent is null. This exception is
always thrown when GraphicsEnvironment.isHeadless() returns true.
Dialog
public Dialog(Dialog parent,
String title,
boolean modal,
GraphicsConfiguration gc)
Initializes a new instance of Dialog
with the specified,
parent, title, modality and GraphicsConfiguration
, that is
resizable.
parent
- The parent frame of this dialog box.title
- The title string for this dialog box.modal
- true
if this dialog box is modal,
false
otherwise.gc
- The GraphicsConfiguration
object to use. If
null
the GraphicsConfiguration
of the target
frame is used.
IllegalArgumentException
- If parent is null, the
GraphicsConfiguration is not a screen device or
GraphicsEnvironment.isHeadless() returns true.
Dialog
public Dialog(Frame parent)
Initializes a new instance of Dialog
with the specified
parent, that is resizable and not modal, and which has no title.
parent
- The parent frame of this dialog box.
IllegalArgumentException
- If the owner's GraphicsConfiguration
is not from a screen device, or if owner is null. This exception is
always thrown when GraphicsEnvironment.isHeadless() returns true.
Dialog
public Dialog(Frame parent,
boolean modal)
Initializes a new instance of Dialog
with the specified
parent and modality, that is resizable and which has no title.
parent
- The parent frame of this dialog box.modal
- true
if this dialog box is modal,
false
otherwise.
IllegalArgumentException
- If the owner's GraphicsConfiguration
is not from a screen device, or if owner is null. This exception is
always thrown when GraphicsEnvironment.isHeadless() returns true.
Dialog
public Dialog(Frame parent,
String title)
Initializes a new instance of Dialog
with the specified
parent, that is resizable and not modal, and which has the specified
title.
parent
- The parent frame of this dialog box.title
- The title string for this dialog box.
IllegalArgumentException
- If the owner's GraphicsConfiguration
is not from a screen device, or if owner is null. This exceptionnis
always thrown when GraphicsEnvironment.isHeadless() returns true.
Dialog
public Dialog(Frame parent,
String title,
boolean modal)
Initializes a new instance of Dialog
with the specified,
parent, title, and modality, that is resizable.
parent
- The parent frame of this dialog box.title
- The title string for this dialog box.modal
- true
if this dialog box is modal,
false
otherwise.
Dialog
public Dialog(Frame parent,
String title,
boolean modal,
GraphicsConfiguration gc)
Initializes a new instance of Dialog
with the specified,
parent, title, modality and GraphicsConfiguration
, that is
resizable.
parent
- The parent frame of this dialog box.title
- The title string for this dialog box.modal
- true
if this dialog box is modal,
false
otherwise.gc
- The GraphicsConfiguration
object to use. If
null
the GraphicsConfiguration
of the target
frame is used.
IllegalArgumentException
- If owner is null, the
GraphicsConfiguration is not a screen device or
GraphicsEnvironment.isHeadless() returns true.
dispose
public void dispose()
Disposes the Dialog and then causes show() to return if it is currently
blocked.
- dispose in interface Window
getTitle
public String getTitle()
Returns the title of this dialog box.
- The title of this dialog box.
isModal
public boolean isModal()
Tests whether or not this dialog box is modal.
true
if this dialog box is modal, false
otherwise.
isResizable
public boolean isResizable()
Tests whether or not this dialog box is resizable.
true
if this dialog is resizable,
false
otherwise.
isUndecorated
public boolean isUndecorated()
Returns whether this frame is undecorated or not.
true
if this dialog is undecorated,
false
otherwise.
setModal
public void setModal(boolean modal)
Changes the modality of this dialog box. This can only be done before the
peer is created.
modal
- true
to make this dialog box modal,
false
to make it non-modal.
setResizable
public void setResizable(boolean resizable)
Changes the resizability of this dialog box.
resizable
- true
to make this dialog resizable,
false
to make it non-resizable.
setTitle
public void setTitle(String title)
Sets the title of this dialog box to the specified string.
title
- the new title. If null
an empty
title will be set.
setUndecorated
public void setUndecorated(boolean undecorated)
Disables or enables decorations for this frame. This method can only be
called while the frame is not displayable.
undecorated
- true
to disable dialog decorations,
false
otherwise.
show
public void show()
Use Component.setVisible(boolean)
instead.
Makes this dialog visible and brings it to the front. If the dialog is
modal and is not already visible, this call will not return until the
dialog is hidden by someone calling hide or dispose. If this is the event
dispatching thread we must ensure that another event thread runs while the
one which invoked this method is blocked.
- show in interface Component
Dialog.java -- An AWT dialog box
Copyright (C) 1999, 2000, 2001, 2002, 2005, 2006
Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.