| java.lang.Object java.awt.Component java.awt.Container java.awt.Window java.awt.Dialog
All known Subclasses: java.awt.FileDialog,
Dialog | public class Dialog extends Window (Code) | | A dialog component is a top level window, . It resembles a
frame, but has fewer properties. It does not have an icon or
a settable cursor. In PersonalJava and Personal Profile
implementations, the display of the title is optional.
A modal dialog, when visible, prevents the user from interacting
with AWT components. A modeless dialog behaves more like a Frame.
A Personal Profile Implementation must support modal dialogs.
Multiple (nested) Modal Dialogs may be implemented so that only
a single dialog is visible at a time: when a new modal is shown,
it must become visible, and when it is dismissed, the previous modal
dialog must be shown.
Nonmodal dialogs are optional in a Personal Profile implementation.
If they are not supported, an UnsupportedOperationException is
thrown when the consturctor is called and the system property
java.awt.dialog.SupportsNonmodal is set to "false".
The modality of a dialog cannot be changed after the dialog has been created.
System Properties
The following system properties will be set to either "true" or "false"
indicating which optional dialog features are supported by the Personal
Profile implementation:
java.awt.dialog.SupportsNonmodal
java.awt.dialog.SupportsMultipleModal
java.awt.dialog.SupportsResize
java.awt.dialog.SupportsTitle
See Also: WindowEvent See Also: Window.addWindowListener version: 1.46, 03/12/01 author: Sami Shaio author: Arthur van Hoff since: JDK1.0 |
Constructor Summary | |
public | Dialog(Frame parent) Creates a dialog. | public | Dialog(Frame parent, boolean modal) Creates a dialog.
Parameters: parent - the non null parent of the dialog Parameters: modal - the modality of the dialog. | public | Dialog(Frame parent, String title) Creates a dialog. | public | Dialog(Frame parent, String title, boolean modal) Creates a dialog.
Parameters: parent - the non null parent of the dialog Parameters: title - the title of the dialog Parameters: modal - the modality of the dialog. |
Method Summary | |
String | constructComponentName() Construct a name for this component. | ComponentXWindow | createXWindow() | public void | dispose() Disposes the Dialog and then causes show() to return if it is currently
blocked. | public String | getTitle() Gets the title of the dialog. | public void | hide() Hides the Dialog and then causes show() to return if it is currently
blocked. | public boolean | isModal() Indicates whether the dialog is modal. | public boolean | isResizable() Indicates whether this dialog window is resizable. | protected String | paramString() Returns the parameter string representing the state of this
dialog window. | public void | setModal(boolean modal) Specifies the modality of the dialog.
This method sets the modal property as specified by modal. | public synchronized void | setResizable(boolean resizable) Sets the Resizable property of the dialog.
This method sets the resizable property of the dialog. | public synchronized void | setTitle(String title) Sets the title of the Dialog. | public void | show() Makes this dialog visible and in front of all windows.
This method calls the dialog's addNotify() method,
validates the dialog's layout, and makes the dialog visible.
If the dialog is modal, show() will not return until the
dialog is no longer visible.
A Personal Profile or Personal Java implementation is not
required to support multiple modal dialogs. |
modal | boolean modal(Code) | | Sets to true if the Dialog is modal. A modal
Dialog grabs all the input to the parent frame from the user.
|
resizable | boolean resizable(Code) | | |
Dialog | public Dialog(Frame parent, boolean modal)(Code) | | Creates a dialog.
Parameters: parent - the non null parent of the dialog Parameters: modal - the modality of the dialog. If true the dialog is modal,otherwise it is modeless. If the implementation does notsupport modeless dialogs and modal is false, anUnsupportedOperationException should be thrown. See Also: Component.setSize See Also: Component.setVisible exception: UnsupportedOperationException - If the implementation does not supportmodeless dialogs. exception: IllegalArgumentException - if the parent in null since: JDK1.0 |
Dialog | public Dialog(Frame parent, String title, boolean modal)(Code) | | Creates a dialog.
Parameters: parent - the non null parent of the dialog Parameters: title - the title of the dialog Parameters: modal - the modality of the dialog. If true the dialog is modal,otherwise it is modeless. If the implementation does notsupport modeless dialogs and modal is false, anUnsupportedOperationException should be thrown. See Also: Component.setSize See Also: Component.setVisible exception: UnsupportedOperationException - If the implementation does not supportmodeless dialogs. exception: IllegalArgumentException - if the parent in null since: JDK1.0 |
constructComponentName | String constructComponentName()(Code) | | Construct a name for this component. Called by getName() when the
name is null.
|
dispose | public void dispose()(Code) | | Disposes the Dialog and then causes show() to return if it is currently
blocked.
|
hide | public void hide()(Code) | | Hides the Dialog and then causes show() to return if it is currently
blocked.
|
isModal | public boolean isModal()(Code) | | Indicates whether the dialog is modal.
A modal dialog grabs all input from the user.
true if this dialog window is modal;false otherwise. See Also: java.awt.Dialog.setModal since: JDK1.0 |
isResizable | public boolean isResizable()(Code) | | Indicates whether this dialog window is resizable.
true if the user can resize the dialog;false otherwise. See Also: java.awt.Dialog.setResizable since: JDK1.0 |
paramString | protected String paramString()(Code) | | Returns the parameter string representing the state of this
dialog window. This string is useful for debugging.
the parameter string of this dialog window. since: JDK1.0 |
setModal | public void setModal(boolean modal)(Code) | | Specifies the modality of the dialog.
This method sets the modal property as specified by modal. A
Personal Profile implementation may optionally support non-modal
dialogs or not allow the modal property to be changed after the
dialog is created. isModal() may be called to verify the setting
of the modal property.
modal desired modality for the dialog See Also: java.awt.Dialog.isModal since: JDK1.1 |
setResizable | public synchronized void setResizable(boolean resizable)(Code) | | Sets the Resizable property of the dialog.
This method sets the resizable property of the dialog. A
dilaog that is resizable may be resized by the user. In Personal
Profile, this method may have no effect, it may be verified with
the isResizable() method.
Parameters: resizable - true if the user canresize this dialog; false otherwise. See Also: java.awt.Dialog.isResizable since: JDK1.0 |
setTitle | public synchronized void setTitle(String title)(Code) | | Sets the title of the Dialog.
Parameters: title - the new title being given to the dialog See Also: Dialog.getTitle since: JDK1.0 |
show | public void show()(Code) | | Makes this dialog visible and in front of all windows.
This method calls the dialog's addNotify() method,
validates the dialog's layout, and makes the dialog visible.
If the dialog is modal, show() will not return until the
dialog is no longer visible.
A Personal Profile or Personal Java implementation is not
required to support multiple modal dialogs. In this case, if
there is a previous modal dialog being shown, it can be hidden
until this Dialog is made invisible via setVisible() or dispose().
This must work recursively to allow for multiple nested modal dialogs.
See Also: Component.setVisible since: JDK1.0 |
Methods inherited from java.awt.Container | public Component add(Component comp)(Code)(Java Doc) public Component add(String name, Component comp)(Code)(Java Doc) public Component add(Component comp, int index)(Code)(Java Doc) public void add(Component comp, Object constraints)(Code)(Java Doc) public void add(Component comp, Object constraints, int index)(Code)(Java Doc) public synchronized void addContainerListener(ContainerListener l)(Code)(Java Doc) protected void addImpl(Component comp, Object constraints, int index)(Code)(Java Doc) public void addNotify()(Code)(Java Doc) public int countComponents()(Code)(Java Doc) public void deliverEvent(Event e)(Code)(Java Doc) public void doLayout()(Code)(Java Doc) boolean eventEnabled(AWTEvent e)(Code)(Java Doc) public float getAlignmentX()(Code)(Java Doc) public float getAlignmentY()(Code)(Java Doc) public Component getComponent(int n)(Code)(Java Doc) public Component getComponentAt(int x, int y)(Code)(Java Doc) public Component getComponentAt(Point p)(Code)(Java Doc) public int getComponentCount()(Code)(Java Doc) public Component[] getComponents()(Code)(Java Doc) public Insets getInsets()(Code)(Java Doc) public LayoutManager getLayout()(Code)(Java Doc) public Dimension getMaximumSize()(Code)(Java Doc) public Dimension getMinimumSize()(Code)(Java Doc) public Dimension getPreferredSize()(Code)(Java Doc) Window getWindow()(Code)(Java Doc) public Insets insets()(Code)(Java Doc) public void invalidate()(Code)(Java Doc) public boolean isAncestorOf(Component c)(Code)(Java Doc) public void layout()(Code)(Java Doc) void lightweightPrint(Graphics g)(Code)(Java Doc) public void list(PrintStream out, int indent)(Code)(Java Doc) public void list(PrintWriter out, int indent)(Code)(Java Doc) public Component locate(int x, int y)(Code)(Java Doc) public Dimension minimumSize()(Code)(Java Doc) void nextFocus(Component base)(Code)(Java Doc) public void paint(Graphics g)(Code)(Java Doc) public void paintComponents(Graphics g)(Code)(Java Doc) protected String paramString()(Code)(Java Doc) public Dimension preferredSize()(Code)(Java Doc) public void print(Graphics g)(Code)(Java Doc) public void printComponents(Graphics g)(Code)(Java Doc) protected void processContainerEvent(ContainerEvent e)(Code)(Java Doc) protected void processEvent(AWTEvent e)(Code)(Java Doc) public void remove(int index)(Code)(Java Doc) public void remove(Component comp)(Code)(Java Doc) public void removeAll()(Code)(Java Doc) public synchronized void removeContainerListener(ContainerListener l)(Code)(Java Doc) public void removeNotify()(Code)(Java Doc) public void setLayout(LayoutManager mgr)(Code)(Java Doc) void transferFocus(Component base)(Code)(Java Doc) public void update(Graphics g)(Code)(Java Doc) public void validate()(Code)(Java Doc) protected void validateTree()(Code)(Java Doc)
|
Methods inherited from java.awt.Component | public boolean action(Event evt, Object what)(Code)(Java Doc) public synchronized void add(PopupMenu popup)(Code)(Java Doc) public synchronized void addComponentListener(ComponentListener l)(Code)(Java Doc) public synchronized void addFocusListener(FocusListener l)(Code)(Java Doc) public synchronized void addKeyListener(KeyListener l)(Code)(Java Doc) public synchronized void addMouseListener(MouseListener l)(Code)(Java Doc) public synchronized void addMouseMotionListener(MouseMotionListener l)(Code)(Java Doc) public void addNotify()(Code)(Java Doc) boolean areInputMethodsEnabled()(Code)(Java Doc) public Rectangle bounds()(Code)(Java Doc) final void checkEnableNewEventsOnly(Object listener)(Code)(Java Doc) public int checkImage(Image image, ImageObserver observer)(Code)(Java Doc) public int checkImage(Image image, int width, int height, ImageObserver observer)(Code)(Java Doc) protected AWTEvent coalesceEvents(AWTEvent existingEvent, AWTEvent newEvent)(Code)(Java Doc) String constructComponentName()(Code)(Java Doc) public boolean contains(int x, int y)(Code)(Java Doc) public boolean contains(Point p)(Code)(Java Doc) public Image createImage(ImageProducer producer)(Code)(Java Doc) public Image createImage(int width, int height)(Code)(Java Doc) ComponentXWindow createXWindow()(Code)(Java Doc) public void deliverEvent(Event e)(Code)(Java Doc) public void disable()(Code)(Java Doc) final protected void disableEvents(long eventsToDisable)(Code)(Java Doc) final public void dispatchEvent(AWTEvent e)(Code)(Java Doc) void dispatchEventImpl(AWTEvent e)(Code)(Java Doc) public void doLayout()(Code)(Java Doc) public void enable()(Code)(Java Doc) public void enable(boolean b)(Code)(Java Doc) final protected synchronized void enableEvents(long eventsToEnable)(Code)(Java Doc) boolean eventEnabled(AWTEvent e)(Code)(Java Doc) Component findFocusDelegate(Container container)(Code)(Java Doc) public float getAlignmentX()(Code)(Java Doc) public float getAlignmentY()(Code)(Java Doc) public Color getBackground()(Code)(Java Doc) public Rectangle getBounds()(Code)(Java Doc) public ColorModel getColorModel()(Code)(Java Doc) public Component getComponentAt(int x, int y)(Code)(Java Doc) public Component getComponentAt(Point p)(Code)(Java Doc) public Cursor getCursor()(Code)(Java Doc) Component getFocusDelegate()(Code)(Java Doc) public Font getFont()(Code)(Java Doc) Component getFontAndColorDelegate()(Code)(Java Doc) public FontMetrics getFontMetrics(Font font)(Code)(Java Doc) public Color getForeground()(Code)(Java Doc) public Graphics getGraphics()(Code)(Java Doc) InputContext getInputContext()(Code)(Java Doc) public Locale getLocale()(Code)(Java Doc) public Point getLocation()(Code)(Java Doc) public Point getLocationOnScreen()(Code)(Java Doc) public Dimension getMaximumSize()(Code)(Java Doc) public Dimension getMinimumSize()(Code)(Java Doc) public String getName()(Code)(Java Doc) Container getNativeContainer()(Code)(Java Doc) public Container getParent()(Code)(Java Doc) public Dimension getPreferredSize()(Code)(Java Doc) public Dimension getSize()(Code)(Java Doc) public Toolkit getToolkit()(Code)(Java Doc) final public Object getTreeLock()(Code)(Java Doc) public boolean gotFocus(Event evt, Object what)(Code)(Java Doc) public boolean handleEvent(Event evt)(Code)(Java Doc) public void hide()(Code)(Java Doc) public boolean imageUpdate(Image img, int flags, int x, int y, int w, int h)(Code)(Java Doc) public boolean inside(int x, int y)(Code)(Java Doc) public void invalidate()(Code)(Java Doc) static void invokeAndWait(Runnable runnable)(Code)(Java Doc) public boolean isDisplayable()(Code)(Java Doc) public boolean isEnabled()(Code)(Java Doc) public boolean isFocusTraversable()(Code)(Java Doc) public boolean isLightweight()(Code)(Java Doc) boolean isLightweightWhenDisplayable()(Code)(Java Doc) public boolean isOpaque()(Code)(Java Doc) public boolean isShowing()(Code)(Java Doc) public boolean isValid()(Code)(Java Doc) public boolean isVisible()(Code)(Java Doc) public boolean keyDown(Event evt, int key)(Code)(Java Doc) public boolean keyUp(Event evt, int key)(Code)(Java Doc) public void layout()(Code)(Java Doc) void lightweightPrint(Graphics g)(Code)(Java Doc) public void list()(Code)(Java Doc) public void list(PrintStream out)(Code)(Java Doc) public void list(PrintStream out, int indent)(Code)(Java Doc) public void list(PrintWriter out)(Code)(Java Doc) public void list(PrintWriter out, int indent)(Code)(Java Doc) public Component locate(int x, int y)(Code)(Java Doc) public Point location()(Code)(Java Doc) public boolean lostFocus(Event evt, Object what)(Code)(Java Doc) public Dimension minimumSize()(Code)(Java Doc) public boolean mouseDown(Event evt, int x, int y)(Code)(Java Doc) public boolean mouseDrag(Event evt, int x, int y)(Code)(Java Doc) public boolean mouseEnter(Event evt, int x, int y)(Code)(Java Doc) public boolean mouseExit(Event evt, int x, int y)(Code)(Java Doc) public boolean mouseMove(Event evt, int x, int y)(Code)(Java Doc) public boolean mouseUp(Event evt, int x, int y)(Code)(Java Doc) public void move(int x, int y)(Code)(Java Doc) public void nextFocus()(Code)(Java Doc) public void paint(Graphics g)(Code)(Java Doc) public void paintAll(Graphics g)(Code)(Java Doc) protected String paramString()(Code)(Java Doc) public boolean postEvent(Event e)(Code)(Java Doc) public Dimension preferredSize()(Code)(Java Doc) public boolean prepareImage(Image image, ImageObserver observer)(Code)(Java Doc) public boolean prepareImage(Image image, int width, int height, ImageObserver observer)(Code)(Java Doc) public void print(Graphics g)(Code)(Java Doc) public void printAll(Graphics g)(Code)(Java Doc) protected void processComponentEvent(ComponentEvent e)(Code)(Java Doc) protected void processEvent(AWTEvent e)(Code)(Java Doc) protected void processFocusEvent(FocusEvent e)(Code)(Java Doc) protected void processKeyEvent(KeyEvent e)(Code)(Java Doc) protected void processMouseEvent(MouseEvent e)(Code)(Java Doc) protected void processMouseMotionEvent(MouseEvent e)(Code)(Java Doc) public synchronized void remove(MenuComponent popup)(Code)(Java Doc) public synchronized void removeComponentListener(ComponentListener l)(Code)(Java Doc) public synchronized void removeFocusListener(FocusListener l)(Code)(Java Doc) public synchronized void removeKeyListener(KeyListener l)(Code)(Java Doc) public synchronized void removeMouseListener(MouseListener l)(Code)(Java Doc) public synchronized void removeMouseMotionListener(MouseMotionListener l)(Code)(Java Doc) public void removeNotify()(Code)(Java Doc) public void repaint()(Code)(Java Doc) public void repaint(long tm)(Code)(Java Doc) public void repaint(int x, int y, int width, int height)(Code)(Java Doc) public void repaint(long tm, int x, int y, int width, int height)(Code)(Java Doc) public void requestFocus()(Code)(Java Doc) public void reshape(int x, int y, int width, int height)(Code)(Java Doc) public void resize(int width, int height)(Code)(Java Doc) public void resize(Dimension d)(Code)(Java Doc) public void setBackground(Color c)(Code)(Java Doc) public void setBounds(int x, int y, int width, int height)(Code)(Java Doc) public void setBounds(Rectangle r)(Code)(Java Doc) public synchronized void setCursor(Cursor cursor)(Code)(Java Doc) public void setEnabled(boolean b)(Code)(Java Doc) public void setFont(Font f)(Code)(Java Doc) public void setForeground(Color c)(Code)(Java Doc) public void setLocale(Locale l)(Code)(Java Doc) public void setLocation(int x, int y)(Code)(Java Doc) public void setLocation(Point p)(Code)(Java Doc) public void setName(String name)(Code)(Java Doc) public void setSize(int width, int height)(Code)(Java Doc) public void setSize(Dimension d)(Code)(Java Doc) public void setVisible(boolean b)(Code)(Java Doc) public void show()(Code)(Java Doc) public void show(boolean b)(Code)(Java Doc) public Dimension size()(Code)(Java Doc) public String toString()(Code)(Java Doc) public void transferFocus()(Code)(Java Doc) public void update(Graphics g)(Code)(Java Doc) public void validate()(Code)(Java Doc)
|
|
|