Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Class java.awt.Dialog

java.lang.Object
    |
    +----java.awt.Component
            |
            +----java.awt.Container
                    |
                    +----java.awt.Window
                            |
                            +----java.awt.Dialog
Subclasses:
FileDialog, JDialog

public class Dialog
extends Window
A class that produces a dialog - a window that takes input from the user. The default layout for a dialog is BorderLayout.

Dialogs are capable of generating the following window events: WindowOpened, WindowClosing, WindowClosed, WindowActivated, WindowDeactivated.

Since:
JDK1.0
See Also:
WindowEvent, addWindowListener

Fields inherited from class java.awt.Component
 BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 

Constructor Summary
 Dialog(Frame owner)
Constructs an initially invisible Dialog with an empty title.
 Dialog(Frame owner, boolean modal)
Constructs an initially invisible Dialog with an empty title.
 Dialog(Frame owner, String title)
Constructs an initially invisible Dialog with a title.
 Dialog(Frame owner, String title, boolean modal)
Constructs an initially invisible Dialog with a title.
 Dialog(Dialog owner)
Constructs an initially invisible Dialog with an empty title.
 Dialog(Dialog owner, String title)
Constructs an initially invisible Dialog with a title.
 Dialog(Dialog owner, String title, boolean modal)
Constructs an initially invisible Dialog with a title.
 

Method Summary
void  addNotify()
Creates the dialog's peer.
String  getTitle()
Gets the title of the dialog.
boolean  isModal()
Indicates whether the dialog is modal.
boolean  isResizable()
Indicates whether this dialog window is resizable.
String  paramString()
Returns the parameter string representing the state of this dialog window.
void  setModal(boolean b)
Specifies whether this dialog is modal.
void  setResizable(boolean resizable)
Sets the resizable flag.
void  setTitle(String title)
Sets the title of the Dialog.
void  show()
Shows the dialog.
 
Methods inherited from class java.awt.Window
 addNotify, addWindowListener, dispose, getFocusOwner, getInputContext, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, isShowing, pack, postEvent, processEvent, processWindowEvent, removeWindowListener, show, toBack, toFront
 
Methods inherited from class java.awt.Container
 add, add, add, add, add, addContainerListener, addImpl, addNotify, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setLayout, update, validate, validateTree
 
Methods inherited from class java.awt.Component
 action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getColorModel, getComponentAt, getComponentAt, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isEnabled, isFocusTraversable, isLightweight, isOpaque, 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, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
 
Methods inherited from class java.lang.Object
 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dialog

public Dialog(Frame owner)
Constructs an initially invisible Dialog with an empty title.
Parameters:
owner - the owner of the dialog
See Also:
setSize, setVisible

Dialog

public Dialog(Frame owner,
              boolean modal)
Constructs an initially invisible Dialog with an empty title. A modal Dialog grabs all the input to the owner frame from the user.
Parameters:
owner - the owner of the dialog
modal - if true, dialog blocks input to the parent window when shown

Dialog

public Dialog(Frame owner,
              String title)
Constructs an initially invisible Dialog with a title.
Parameters:
owner - the owner of the dialog
title - the title of the dialog
See Also:
setSize, setVisible

Dialog

public Dialog(Frame owner,
              String title,
              boolean modal)
Constructs an initially invisible Dialog with a title. A modal Dialog grabs all the input to the owner frame from the user.
Parameters:
owner - the owner of the dialog
title - the title of the dialog
modal - if true, dialog blocks input to the parent window when shown
See Also:
setSize, setVisible

Dialog

public Dialog(Dialog owner)
Constructs an initially invisible Dialog with an empty title.
Parameters:
owner - the owner of the dialog

Dialog

public Dialog(Dialog owner,
              String title)
Constructs an initially invisible Dialog with a title.
Parameters:
owner - the owner of the dialog
title - the title of the dialog

Dialog

public Dialog(Dialog owner,
              String title,
              boolean modal)
Constructs an initially invisible Dialog with a title. A modal Dialog grabs all the input to the owning window from the user.
Parameters:
owner - the owner of the dialog
title - the title of the dialog
modal - if true, dialog blocks input to the owning window when shown
Method Detail

addNotify

public void addNotify()
Creates the dialog's peer. The peer allows us to change the appearance of the frame without changing its functionality.
Overrides:
addNotify in class Window

isModal

public boolean isModal()
Indicates whether the dialog is modal. A modal dialog grabs all input from the user.
Returns:
true if this dialog window is modal; false otherwise.
See Also:
setModal

setModal

public void setModal(boolean b)
Specifies whether this dialog is modal. A modal Dialog grabs all the input to the parent frame from the user.
See Also:
isModal

getTitle

public String getTitle()
Gets the title of the dialog.
Returns:
the title of this dialog window.
See Also:
setTitle

setTitle

public void setTitle(String title)
Sets the title of the Dialog.
Parameters:
title - the new title being given to the dialog
See Also:
getTitle

show

public void show()
Shows the dialog. This will bring the dialog to the front if the dialog is already visible. If the dialog is modal, this call will block input to the parent window until the dialog is taken down by calling hide or dispose. It is permissible to show modal dialogs from the event dispatching thread because the toolkit will ensure that another dispatching thread will run while the one which invoked show is blocked.
Overrides:
show in class Window
See Also:
hide

isResizable

public boolean isResizable()
Indicates whether this dialog window is resizable.
Returns:
true if the user can resize the dialog; false otherwise.
See Also:
setResizable

setResizable

public void setResizable(boolean resizable)
Sets the resizable flag.
Parameters:
resizable - true if the user can resize this dialog; false otherwise.
See Also:
isResizable

paramString

protected String paramString()
Returns the parameter string representing the state of this dialog window. This string is useful for debugging.
Returns:
the parameter string of this dialog window.
Overrides:
paramString in class Container

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.