|
|||||||||
| Home >> All >> java >> [ awt overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.awt
Class Dialog

java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.awt.image.ImageObserver, MenuContainer, java.io.Serializable
- Direct Known Subclasses:
- FileDialog
- public class Dialog
- extends Window
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).
| Nested Class Summary | |
protected class |
Dialog.AccessibleAWTDialog
Accessibility support for Dialog. |
| Nested classes inherited from class java.awt.Window |
Window.AccessibleAWTWindow |
| Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer, Container.GfxPaintAllVisitor, Container.GfxPaintVisitor, Container.GfxPrintAllVisitor, Container.GfxPrintVisitor, Container.GfxVisitor |
| Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy, Component.HeavyweightInLightweightListener |
| Field Summary | |
private boolean |
blocked
Indicates that we are blocked for modality in show |
private EventQueue |
eq2
Secondary EventQueue to handle AWT events while we are blocked for modality in show. |
private boolean |
modal
|
private boolean |
resizable
|
private static long |
serialVersionUID
|
private java.lang.String |
title
|
private boolean |
undecorated
This field indicates whether the dialog is undecorated or not. |
| Fields inherited from class java.awt.Window |
windowFocusOwner |
| Fields inherited from class java.awt.Container |
component, containerListener, containerSerializedDataVersion, focusCycleRoot, focusTraversalKeys, layoutMgr, maxSize, ncomponents |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
Dialog(Dialog owner)
Initializes a new instance of Dialog with the specified,
parent, that is resizable. |
|
Dialog(Dialog owner,
java.lang.String title)
Initializes a new instance of Dialog with the specified,
parent and title, that is resizable. |
|
Dialog(Dialog owner,
java.lang.String title,
boolean modal)
Initializes a new instance of Dialog with the specified,
parent, title and modality, that is resizable. |
|
Dialog(Dialog parent,
java.lang.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,
java.lang.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,
java.lang.String title,
boolean modal)
Initializes a new instance of Dialog with the specified,
parent, title, and modality, that is resizable. |
|
Dialog(Frame parent,
java.lang.String title,
boolean modal,
GraphicsConfiguration gc)
Initializes a new instance of Dialog with the specified,
parent, title, modality and GraphicsConfiguration, that is
resizable. |
|
| Method Summary | |
void |
addNotify()
Creates this object's native peer. |
void |
dispose()
Disposes the Dialog and then causes show() to return if it is currently blocked. |
javax.accessibility.AccessibleContext |
getAccessibleContext()
Gets the AccessibleContext associated with this Dialog. |
java.lang.String |
getTitle()
Returns the title of this dialog box. |
void |
hide()
Deprecated. Use Component.setVisible(boolean) 55 instead. |
boolean |
isModal()
Tests whether or not this dialog box is modal. |
boolean |
isResizable()
Tests whether or not this dialog box is resizable. |
boolean |
isUndecorated()
Returns whether this frame is undecorated or not. |
protected java.lang.String |
paramString()
Returns a debugging string for this component. |
void |
setModal(boolean modal)
Changes the modality of this dialog box. |
void |
setResizable(boolean resizable)
Changes the resizability of this dialog box. |
void |
setTitle(java.lang.String title)
Sets the title of this dialog box to the specified string. |
void |
setUndecorated(boolean undecorated)
Disables or enables decorations for this frame. |
void |
show()
Deprecated. Use Component.setVisible(boolean) 55 instead. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
modal
private boolean modal
resizable
private boolean resizable
title
private java.lang.String title
undecorated
private boolean undecorated
- This field indicates whether the dialog is undecorated or not.
blocked
private boolean blocked
- Indicates that we are blocked for modality in show
eq2
private EventQueue eq2
- Secondary EventQueue to handle AWT events while we are blocked for
modality in show.
| Constructor Detail |
Dialog
public Dialog(Frame parent)
- Initializes a new instance of
Dialogwith the specified parent, that is resizable and not modal, and which has no title.
Dialog
public Dialog(Frame parent, boolean modal)
- Initializes a new instance of
Dialogwith the specified parent and modality, that is resizable and which has no title.
Dialog
public Dialog(Frame parent, java.lang.String title)
- Initializes a new instance of
Dialogwith the specified parent, that is resizable and not modal, and which has the specified title.
Dialog
public Dialog(Frame parent, java.lang.String title, boolean modal)
- Initializes a new instance of
Dialogwith the specified, parent, title, and modality, that is resizable.
Dialog
public Dialog(Frame parent, java.lang.String title, boolean modal, GraphicsConfiguration gc)
- Initializes a new instance of
Dialogwith the specified, parent, title, modality andGraphicsConfiguration, that is resizable. - Since:
- 1.4
Dialog
public Dialog(Dialog owner)
- Initializes a new instance of
Dialogwith the specified, parent, that is resizable. - Since:
- 1.2
Dialog
public Dialog(Dialog owner, java.lang.String title)
- Initializes a new instance of
Dialogwith the specified, parent and title, that is resizable. - Since:
- 1.2
Dialog
public Dialog(Dialog owner, java.lang.String title, boolean modal)
- Initializes a new instance of
Dialogwith the specified, parent, title and modality, that is resizable. - Since:
- 1.2
Dialog
public Dialog(Dialog parent, java.lang.String title, boolean modal, GraphicsConfiguration gc)
- Initializes a new instance of
Dialogwith the specified, parent, title, modality andGraphicsConfiguration, that is resizable. - Since:
- 1.4
| Method Detail |
getTitle
public java.lang.String getTitle()
- Returns the title of this dialog box.
setTitle
public void setTitle(java.lang.String title)
- Sets the title of this dialog box to the specified string.
isModal
public boolean isModal()
- Tests whether or not this dialog box is modal.
setModal
public void setModal(boolean modal)
- Changes the modality of this dialog box. This can only be done before the
peer is created.
isResizable
public boolean isResizable()
- Tests whether or not this dialog box is resizable.
setResizable
public void setResizable(boolean resizable)
- Changes the resizability of this dialog box.
addNotify
public void addNotify()
show
public void show()
- Deprecated. Use
Component.setVisible(boolean)55 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.
- 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.
hide
public void hide()
- Deprecated. Use
Component.setVisible(boolean)55 instead.- Hides the Dialog and then causes show() to return if it is currently blocked.
- Hides the Dialog and then causes show() to return if it is currently blocked.
dispose
public void dispose()
- Disposes the Dialog and then causes show() to return if it is currently
blocked.
paramString
protected java.lang.String paramString()
- Returns a debugging string for this component.
- Overrides:
paramStringin classContainer
isUndecorated
public boolean isUndecorated()
- Returns whether this frame is undecorated or not.
- Since:
- 1.4
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.
- Since:
- 1.4
getAccessibleContext
public javax.accessibility.AccessibleContext getAccessibleContext()
- Gets the AccessibleContext associated with this
Dialog. The context is created, if necessary.- Specified by:
getAccessibleContextin interfacejavax.accessibility.Accessible- Overrides:
getAccessibleContextin classWindow
|
|||||||||
| Home >> All >> java >> [ awt overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC