提交 304962ab 编写于 作者: M malenkov

6635395: javax.swing.JDialog constructors should specify IAE throwing if invalid owners passed

Reviewed-by: alexp
上级 19695839
/* /*
* Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -26,12 +26,7 @@ package javax.swing; ...@@ -26,12 +26,7 @@ package javax.swing;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.*;
import java.beans.PropertyChangeListener;
import java.util.Locale;
import java.util.Vector;
import java.io.Serializable;
import javax.accessibility.*; import javax.accessibility.*;
import java.applet.Applet;
/** /**
* The main class for creating a dialog window. You can use this class * The main class for creating a dialog window. You can use this class
...@@ -45,30 +40,30 @@ import java.applet.Applet; ...@@ -45,30 +40,30 @@ import java.applet.Applet;
* *
* <p> * <p>
* *
* The <code>JDialog</code> component contains a <code>JRootPane</code> * The {@code JDialog} component contains a {@code JRootPane}
* as its only child. * as its only child.
* The <code>contentPane</code> should be the parent of any children of the * The {@code contentPane} should be the parent of any children of the
* <code>JDialog</code>. * {@code JDialog}.
* As a convenience <code>add</code> and its variants, <code>remove</code> and * As a convenience {@code add} and its variants, {@code remove} and
* <code>setLayout</code> have been overridden to forward to the * {@code setLayout} have been overridden to forward to the
* <code>contentPane</code> as necessary. This means you can write: * {@code contentPane} as necessary. This means you can write:
* <pre> * <pre>
* dialog.add(child); * dialog.add(child);
* </pre> * </pre>
* And the child will be added to the contentPane. * And the child will be added to the contentPane.
* The <code>contentPane</code> is always non-<code>null</code>. * The {@code contentPane} is always non-{@code null}.
* Attempting to set it to <code>null</code> generates an exception. * Attempting to set it to {@code null} generates an exception.
* The default <code>contentPane</code> has a <code>BorderLayout</code> * The default {@code contentPane} has a {@code BorderLayout}
* manager set on it. * manager set on it.
* Refer to {@link javax.swing.RootPaneContainer} * Refer to {@link javax.swing.RootPaneContainer}
* for details on adding, removing and setting the <code>LayoutManager</code> * for details on adding, removing and setting the {@code LayoutManager}
* of a <code>JDialog</code>. * of a {@code JDialog}.
* <p> * <p>
* Please see the <code>JRootPane</code> documentation for a complete * Please see the {@code JRootPane} documentation for a complete
* description of the <code>contentPane</code>, <code>glassPane</code>, * description of the {@code contentPane}, {@code glassPane},
* and <code>layeredPane</code> components. * and {@code layeredPane} components.
* <p> * <p>
* In a multi-screen environment, you can create a <code>JDialog</code> * In a multi-screen environment, you can create a {@code JDialog}
* on a different screen device than its owner. See {@link java.awt.Frame} for * on a different screen device than its owner. See {@link java.awt.Frame} for
* more information. * more information.
* <p> * <p>
...@@ -83,7 +78,7 @@ import java.applet.Applet; ...@@ -83,7 +78,7 @@ import java.applet.Applet;
* appropriate for short term storage or RMI between applications running * appropriate for short term storage or RMI between applications running
* the same version of Swing. As of 1.4, support for long term storage * the same version of Swing. As of 1.4, support for long term storage
* of all JavaBeans<sup><font size="-2">TM</font></sup> * of all JavaBeans<sup><font size="-2">TM</font></sup>
* has been added to the <code>java.beans</code> package. * has been added to the {@code java.beans} package.
* Please see {@link java.beans.XMLEncoder}. * Please see {@link java.beans.XMLEncoder}.
* *
* @see JOptionPane * @see JOptionPane
...@@ -120,9 +115,9 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -120,9 +115,9 @@ public class JDialog extends Dialog implements WindowConstants,
protected JRootPane rootPane; protected JRootPane rootPane;
/** /**
* If true then calls to <code>add</code> and <code>setLayout</code> * If true then calls to {@code add} and {@code setLayout}
* will be forwarded to the <code>contentPane</code>. This is initially * will be forwarded to the {@code contentPane}. This is initially
* false, but is set to true when the <code>JDialog</code> is constructed. * false, but is set to true when the {@code JDialog} is constructed.
* *
* @see #isRootPaneCheckingEnabled * @see #isRootPaneCheckingEnabled
* @see #setRootPaneCheckingEnabled * @see #setRootPaneCheckingEnabled
...@@ -131,26 +126,26 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -131,26 +126,26 @@ public class JDialog extends Dialog implements WindowConstants,
protected boolean rootPaneCheckingEnabled = false; protected boolean rootPaneCheckingEnabled = false;
/** /**
* The <code>TransferHandler</code> for this dialog. * The {@code TransferHandler} for this dialog.
*/ */
private TransferHandler transferHandler; private TransferHandler transferHandler;
/** /**
* Creates a modeless dialog without a title and without a specified * Creates a modeless dialog without a title and without a specified
* <code>Frame</code> owner. A shared, hidden frame will be * {@code Frame} owner. A shared, hidden frame will be
* set as the owner of the dialog. * set as the owner of the dialog.
* <p> * <p>
* This constructor sets the component's locale property to the value * This constructor sets the component's locale property to the value
* returned by <code>JComponent.getDefaultLocale</code>. * returned by {@code JComponent.getDefaultLocale}.
* <p> * <p>
* NOTE: This constructor does not allow you to create an unowned * NOTE: This constructor does not allow you to create an unowned
* <code>JDialog</code>. To create an unowned <code>JDialog</code> * {@code JDialog}. To create an unowned {@code JDialog}
* you must use either the <code>JDialog(Window)</code> or * you must use either the {@code JDialog(Window)} or
* <code>JDialog(Dialog)</code> constructor with an argument of * {@code JDialog(Dialog)} constructor with an argument of
* <code>null</code>. * {@code null}.
* *
* @exception HeadlessException if <code>GraphicsEnvironment.isHeadless()</code> * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()}
* returns <code>true</code>. * returns {@code true}.
* @see java.awt.GraphicsEnvironment#isHeadless * @see java.awt.GraphicsEnvironment#isHeadless
* @see JComponent#getDefaultLocale * @see JComponent#getDefaultLocale
*/ */
...@@ -160,22 +155,22 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -160,22 +155,22 @@ public class JDialog extends Dialog implements WindowConstants,
/** /**
* Creates a modeless dialog without a title with the * Creates a modeless dialog without a title with the
* specified <code>Frame</code> as its owner. If <code>owner</code> * specified {@code Frame} as its owner. If {@code owner}
* is <code>null</code>, a shared, hidden frame will be set as the * is {@code null}, a shared, hidden frame will be set as the
* owner of the dialog. * owner of the dialog.
* <p> * <p>
* This constructor sets the component's locale property to the value * This constructor sets the component's locale property to the value
* returned by <code>JComponent.getDefaultLocale</code>. * returned by {@code JComponent.getDefaultLocale}.
* <p> * <p>
* NOTE: This constructor does not allow you to create an unowned * NOTE: This constructor does not allow you to create an unowned
* <code>JDialog</code>. To create an unowned <code>JDialog</code> * {@code JDialog}. To create an unowned {@code JDialog}
* you must use either the <code>JDialog(Window)</code> or * you must use either the {@code JDialog(Window)} or
* <code>JDialog(Dialog)</code> constructor with an argument of * {@code JDialog(Dialog)} constructor with an argument of
* <code>null</code>. * {@code null}.
* *
* @param owner the <code>Frame</code> from which the dialog is displayed * @param owner the {@code Frame} from which the dialog is displayed
* @exception HeadlessException if <code>GraphicsEnvironment.isHeadless()</code> * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()}
* returns <code>true</code>. * returns {@code true}.
* @see java.awt.GraphicsEnvironment#isHeadless * @see java.awt.GraphicsEnvironment#isHeadless
* @see JComponent#getDefaultLocale * @see JComponent#getDefaultLocale
*/ */
...@@ -184,25 +179,25 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -184,25 +179,25 @@ public class JDialog extends Dialog implements WindowConstants,
} }
/** /**
* Creates a dialog with the specified owner <code>Frame</code>, modality * Creates a dialog with the specified owner {@code Frame}, modality
* and an empty title. If <code>owner</code> is <code>null</code>, * and an empty title. If {@code owner} is {@code null},
* a shared, hidden frame will be set as the owner of the dialog. * a shared, hidden frame will be set as the owner of the dialog.
* <p> * <p>
* This constructor sets the component's locale property to the value * This constructor sets the component's locale property to the value
* returned by <code>JComponent.getDefaultLocale</code>. * returned by {@code JComponent.getDefaultLocale}.
* <p> * <p>
* NOTE: This constructor does not allow you to create an unowned * NOTE: This constructor does not allow you to create an unowned
* <code>JDialog</code>. To create an unowned <code>JDialog</code> * {@code JDialog}. To create an unowned {@code JDialog}
* you must use either the <code>JDialog(Window)</code> or * you must use either the {@code JDialog(Window)} or
* <code>JDialog(Dialog)</code> constructor with an argument of * {@code JDialog(Dialog)} constructor with an argument of
* <code>null</code>. * {@code null}.
* *
* @param owner the <code>Frame</code> from which the dialog is displayed * @param owner the {@code Frame} from which the dialog is displayed
* @param modal specifies whether dialog blocks user input to other top-level * @param modal specifies whether dialog blocks user input to other top-level
* windows when shown. If <code>true</code>, the modality type property is set to * windows when shown. If {@code true}, the modality type property is set to
* <code>DEFAULT_MODALITY_TYPE</code>, otherwise the dialog is modeless. * {@code DEFAULT_MODALITY_TYPE}, otherwise the dialog is modeless.
* @exception HeadlessException if <code>GraphicsEnvironment.isHeadless()</code> * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()}
* returns <code>true</code>. * returns {@code true}.
* @see java.awt.GraphicsEnvironment#isHeadless * @see java.awt.GraphicsEnvironment#isHeadless
* @see JComponent#getDefaultLocale * @see JComponent#getDefaultLocale
*/ */
...@@ -212,24 +207,24 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -212,24 +207,24 @@ public class JDialog extends Dialog implements WindowConstants,
/** /**
* Creates a modeless dialog with the specified title and * Creates a modeless dialog with the specified title and
* with the specified owner frame. If <code>owner</code> * with the specified owner frame. If {@code owner}
* is <code>null</code>, a shared, hidden frame will be set as the * is {@code null}, a shared, hidden frame will be set as the
* owner of the dialog. * owner of the dialog.
* <p> * <p>
* This constructor sets the component's locale property to the value * This constructor sets the component's locale property to the value
* returned by <code>JComponent.getDefaultLocale</code>. * returned by {@code JComponent.getDefaultLocale}.
* <p> * <p>
* NOTE: This constructor does not allow you to create an unowned * NOTE: This constructor does not allow you to create an unowned
* <code>JDialog</code>. To create an unowned <code>JDialog</code> * {@code JDialog}. To create an unowned {@code JDialog}
* you must use either the <code>JDialog(Window)</code> or * you must use either the {@code JDialog(Window)} or
* <code>JDialog(Dialog)</code> constructor with an argument of * {@code JDialog(Dialog)} constructor with an argument of
* <code>null</code>. * {@code null}.
* *
* @param owner the <code>Frame</code> from which the dialog is displayed * @param owner the {@code Frame} from which the dialog is displayed
* @param title the <code>String</code> to display in the dialog's * @param title the {@code String} to display in the dialog's
* title bar * title bar
* @exception HeadlessException if <code>GraphicsEnvironment.isHeadless()</code> * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()}
* returns <code>true</code>. * returns {@code true}.
* @see java.awt.GraphicsEnvironment#isHeadless * @see java.awt.GraphicsEnvironment#isHeadless
* @see JComponent#getDefaultLocale * @see JComponent#getDefaultLocale
*/ */
...@@ -238,31 +233,31 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -238,31 +233,31 @@ public class JDialog extends Dialog implements WindowConstants,
} }
/** /**
* Creates a dialog with the specified title, owner <code>Frame</code> * Creates a dialog with the specified title, owner {@code Frame}
* and modality. If <code>owner</code> is <code>null</code>, * and modality. If {@code owner} is {@code null},
* a shared, hidden frame will be set as the owner of this dialog. * a shared, hidden frame will be set as the owner of this dialog.
* <p> * <p>
* This constructor sets the component's locale property to the value * This constructor sets the component's locale property to the value
* returned by <code>JComponent.getDefaultLocale</code>. * returned by {@code JComponent.getDefaultLocale}.
* <p> * <p>
* NOTE: Any popup components (<code>JComboBox</code>, * NOTE: Any popup components ({@code JComboBox},
* <code>JPopupMenu</code>, <code>JMenuBar</code>) * {@code JPopupMenu}, {@code JMenuBar})
* created within a modal dialog will be forced to be lightweight. * created within a modal dialog will be forced to be lightweight.
* <p> * <p>
* NOTE: This constructor does not allow you to create an unowned * NOTE: This constructor does not allow you to create an unowned
* <code>JDialog</code>. To create an unowned <code>JDialog</code> * {@code JDialog}. To create an unowned {@code JDialog}
* you must use either the <code>JDialog(Window)</code> or * you must use either the {@code JDialog(Window)} or
* <code>JDialog(Dialog)</code> constructor with an argument of * {@code JDialog(Dialog)} constructor with an argument of
* <code>null</code>. * {@code null}.
* *
* @param owner the <code>Frame</code> from which the dialog is displayed * @param owner the {@code Frame} from which the dialog is displayed
* @param title the <code>String</code> to display in the dialog's * @param title the {@code String} to display in the dialog's
* title bar * title bar
* @param modal specifies whether dialog blocks user input to other top-level * @param modal specifies whether dialog blocks user input to other top-level
* windows when shown. If <code>true</code>, the modality type property is set to * windows when shown. If {@code true}, the modality type property is set to
* <code>DEFAULT_MODALITY_TYPE</code> otherwise the dialog is modeless * {@code DEFAULT_MODALITY_TYPE} otherwise the dialog is modeless
* @exception HeadlessException if <code>GraphicsEnvironment.isHeadless()</code> * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()}
* returns <code>true</code>. * returns {@code true}.
* *
* @see java.awt.Dialog.ModalityType * @see java.awt.Dialog.ModalityType
* @see java.awt.Dialog.ModalityType#MODELESS * @see java.awt.Dialog.ModalityType#MODELESS
...@@ -285,35 +280,35 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -285,35 +280,35 @@ public class JDialog extends Dialog implements WindowConstants,
/** /**
* Creates a dialog with the specified title, * Creates a dialog with the specified title,
* owner <code>Frame</code>, modality and <code>GraphicsConfiguration</code>. * owner {@code Frame}, modality and {@code GraphicsConfiguration}.
* If <code>owner</code> is <code>null</code>, * If {@code owner} is {@code null},
* a shared, hidden frame will be set as the owner of this dialog. * a shared, hidden frame will be set as the owner of this dialog.
* <p> * <p>
* This constructor sets the component's locale property to the value * This constructor sets the component's locale property to the value
* returned by <code>JComponent.getDefaultLocale</code>. * returned by {@code JComponent.getDefaultLocale}.
* <p> * <p>
* NOTE: Any popup components (<code>JComboBox</code>, * NOTE: Any popup components ({@code JComboBox},
* <code>JPopupMenu</code>, <code>JMenuBar</code>) * {@code JPopupMenu}, {@code JMenuBar})
* created within a modal dialog will be forced to be lightweight. * created within a modal dialog will be forced to be lightweight.
* <p> * <p>
* NOTE: This constructor does not allow you to create an unowned * NOTE: This constructor does not allow you to create an unowned
* <code>JDialog</code>. To create an unowned <code>JDialog</code> * {@code JDialog}. To create an unowned {@code JDialog}
* you must use either the <code>JDialog(Window)</code> or * you must use either the {@code JDialog(Window)} or
* <code>JDialog(Dialog)</code> constructor with an argument of * {@code JDialog(Dialog)} constructor with an argument of
* <code>null</code>. * {@code null}.
* *
* @param owner the <code>Frame</code> from which the dialog is displayed * @param owner the {@code Frame} from which the dialog is displayed
* @param title the <code>String</code> to display in the dialog's * @param title the {@code String} to display in the dialog's
* title bar * title bar
* @param modal specifies whether dialog blocks user input to other top-level * @param modal specifies whether dialog blocks user input to other top-level
* windows when shown. If <code>true</code>, the modality type property is set to * windows when shown. If {@code true}, the modality type property is set to
* <code>DEFAULT_MODALITY_TYPE</code>, otherwise the dialog is modeless. * {@code DEFAULT_MODALITY_TYPE}, otherwise the dialog is modeless.
* @param gc the <code>GraphicsConfiguration</code> * @param gc the {@code GraphicsConfiguration}
* of the target screen device. If <code>gc</code> is * of the target screen device. If {@code gc} is
* <code>null</code>, the same * {@code null}, the same
* <code>GraphicsConfiguration</code> as the owning Frame is used. * {@code GraphicsConfiguration} as the owning Frame is used.
* @exception HeadlessException if <code>GraphicsEnvironment.isHeadless()</code> * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()}
* returns <code>true</code>. * returns {@code true}.
* @see java.awt.Dialog.ModalityType * @see java.awt.Dialog.ModalityType
* @see java.awt.Dialog.ModalityType#MODELESS * @see java.awt.Dialog.ModalityType#MODELESS
* @see java.awt.Dialog#DEFAULT_MODALITY_TYPE * @see java.awt.Dialog#DEFAULT_MODALITY_TYPE
...@@ -337,15 +332,15 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -337,15 +332,15 @@ public class JDialog extends Dialog implements WindowConstants,
/** /**
* Creates a modeless dialog without a title with the * Creates a modeless dialog without a title with the
* specified <code>Dialog</code> as its owner. * specified {@code Dialog} as its owner.
* <p> * <p>
* This constructor sets the component's locale property to the value * This constructor sets the component's locale property to the value
* returned by <code>JComponent.getDefaultLocale</code>. * returned by {@code JComponent.getDefaultLocale}.
* *
* @param owner the owner <code>Dialog</code> from which the dialog is displayed * @param owner the owner {@code Dialog} from which the dialog is displayed
* or <code>null</code> if this dialog has no owner * or {@code null} if this dialog has no owner
* @exception HeadlessException <code>if GraphicsEnvironment.isHeadless()</code> * @throws HeadlessException {@code if GraphicsEnvironment.isHeadless()}
* returns <code>true</code>. * returns {@code true}.
* @see java.awt.GraphicsEnvironment#isHeadless * @see java.awt.GraphicsEnvironment#isHeadless
* @see JComponent#getDefaultLocale * @see JComponent#getDefaultLocale
*/ */
...@@ -354,18 +349,18 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -354,18 +349,18 @@ public class JDialog extends Dialog implements WindowConstants,
} }
/** /**
* Creates a dialog with the specified owner <code>Dialog</code> and modality. * Creates a dialog with the specified owner {@code Dialog} and modality.
* <p> * <p>
* This constructor sets the component's locale property to the value * This constructor sets the component's locale property to the value
* returned by <code>JComponent.getDefaultLocale</code>. * returned by {@code JComponent.getDefaultLocale}.
* *
* @param owner the owner <code>Dialog</code> from which the dialog is displayed * @param owner the owner {@code Dialog} from which the dialog is displayed
* or <code>null</code> if this dialog has no owner * or {@code null} if this dialog has no owner
* @param modal specifies whether dialog blocks user input to other top-level * @param modal specifies whether dialog blocks user input to other top-level
* windows when shown. If <code>true</code>, the modality type property is set to * windows when shown. If {@code true}, the modality type property is set to
* <code>DEFAULT_MODALITY_TYPE</code>, otherwise the dialog is modeless. * {@code DEFAULT_MODALITY_TYPE}, otherwise the dialog is modeless.
* @exception HeadlessException if <code>GraphicsEnvironment.isHeadless()</code> * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()}
* returns <code>true</code>. * returns {@code true}.
* @see java.awt.Dialog.ModalityType * @see java.awt.Dialog.ModalityType
* @see java.awt.Dialog.ModalityType#MODELESS * @see java.awt.Dialog.ModalityType#MODELESS
* @see java.awt.Dialog#DEFAULT_MODALITY_TYPE * @see java.awt.Dialog#DEFAULT_MODALITY_TYPE
...@@ -383,14 +378,14 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -383,14 +378,14 @@ public class JDialog extends Dialog implements WindowConstants,
* with the specified owner dialog. * with the specified owner dialog.
* <p> * <p>
* This constructor sets the component's locale property to the value * This constructor sets the component's locale property to the value
* returned by <code>JComponent.getDefaultLocale</code>. * returned by {@code JComponent.getDefaultLocale}.
* *
* @param owner the owner <code>Dialog</code> from which the dialog is displayed * @param owner the owner {@code Dialog} from which the dialog is displayed
* or <code>null</code> if this dialog has no owner * or {@code null} if this dialog has no owner
* @param title the <code>String</code> to display in the dialog's * @param title the {@code String} to display in the dialog's
* title bar * title bar
* @exception HeadlessException if <code>GraphicsEnvironment.isHeadless()</code> * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()}
* returns <code>true</code>. * returns {@code true}.
* @see java.awt.GraphicsEnvironment#isHeadless * @see java.awt.GraphicsEnvironment#isHeadless
* @see JComponent#getDefaultLocale * @see JComponent#getDefaultLocale
*/ */
...@@ -400,20 +395,20 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -400,20 +395,20 @@ public class JDialog extends Dialog implements WindowConstants,
/** /**
* Creates a dialog with the specified title, modality * Creates a dialog with the specified title, modality
* and the specified owner <code>Dialog</code>. * and the specified owner {@code Dialog}.
* <p> * <p>
* This constructor sets the component's locale property to the value * This constructor sets the component's locale property to the value
* returned by <code>JComponent.getDefaultLocale</code>. * returned by {@code JComponent.getDefaultLocale}.
* *
* @param owner the owner <code>Dialog</code> from which the dialog is displayed * @param owner the owner {@code Dialog} from which the dialog is displayed
* or <code>null</code> if this dialog has no owner * or {@code null} if this dialog has no owner
* @param title the <code>String</code> to display in the dialog's * @param title the {@code String} to display in the dialog's
* title bar * title bar
* @param modal specifies whether dialog blocks user input to other top-level * @param modal specifies whether dialog blocks user input to other top-level
* windows when shown. If <code>true</code>, the modality type property is set to * windows when shown. If {@code true}, the modality type property is set to
* <code>DEFAULT_MODALITY_TYPE</code>, otherwise the dialog is modeless * {@code DEFAULT_MODALITY_TYPE}, otherwise the dialog is modeless
* @exception HeadlessException if <code>GraphicsEnvironment.isHeadless()</code> * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()}
* returns <code>true</code>. * returns {@code true}.
* @see java.awt.Dialog.ModalityType * @see java.awt.Dialog.ModalityType
* @see java.awt.Dialog.ModalityType#MODELESS * @see java.awt.Dialog.ModalityType#MODELESS
* @see java.awt.Dialog#DEFAULT_MODALITY_TYPE * @see java.awt.Dialog#DEFAULT_MODALITY_TYPE
...@@ -428,30 +423,30 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -428,30 +423,30 @@ public class JDialog extends Dialog implements WindowConstants,
} }
/** /**
* Creates a dialog with the specified title, owner <code>Dialog</code>, * Creates a dialog with the specified title, owner {@code Dialog},
* modality and <code>GraphicsConfiguration</code>. * modality and {@code GraphicsConfiguration}.
* *
* <p> * <p>
* NOTE: Any popup components (<code>JComboBox</code>, * NOTE: Any popup components ({@code JComboBox},
* <code>JPopupMenu</code>, <code>JMenuBar</code>) * {@code JPopupMenu}, {@code JMenuBar})
* created within a modal dialog will be forced to be lightweight. * created within a modal dialog will be forced to be lightweight.
* <p> * <p>
* This constructor sets the component's locale property to the value * This constructor sets the component's locale property to the value
* returned by <code>JComponent.getDefaultLocale</code>. * returned by {@code JComponent.getDefaultLocale}.
* *
* @param owner the owner <code>Dialog</code> from which the dialog is displayed * @param owner the owner {@code Dialog} from which the dialog is displayed
* or <code>null</code> if this dialog has no owner * or {@code null} if this dialog has no owner
* @param title the <code>String</code> to display in the dialog's * @param title the {@code String} to display in the dialog's
* title bar * title bar
* @param modal specifies whether dialog blocks user input to other top-level * @param modal specifies whether dialog blocks user input to other top-level
* windows when shown. If <code>true</code>, the modality type property is set to * windows when shown. If {@code true}, the modality type property is set to
* <code>DEFAULT_MODALITY_TYPE</code>, otherwise the dialog is modeless * {@code DEFAULT_MODALITY_TYPE}, otherwise the dialog is modeless
* @param gc the <code>GraphicsConfiguration</code> * @param gc the {@code GraphicsConfiguration}
* of the target screen device. If <code>gc</code> is * of the target screen device. If {@code gc} is
* <code>null</code>, the same * {@code null}, the same
* <code>GraphicsConfiguration</code> as the owning Dialog is used. * {@code GraphicsConfiguration} as the owning Dialog is used.
* @exception HeadlessException if <code>GraphicsEnvironment.isHeadless()</code> * @throws HeadlessException if {@code GraphicsEnvironment.isHeadless()}
* returns <code>true</code>. * returns {@code true}.
* @see java.awt.Dialog.ModalityType * @see java.awt.Dialog.ModalityType
* @see java.awt.Dialog.ModalityType#MODELESS * @see java.awt.Dialog.ModalityType#MODELESS
* @see java.awt.Dialog#DEFAULT_MODALITY_TYPE * @see java.awt.Dialog#DEFAULT_MODALITY_TYPE
...@@ -468,16 +463,22 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -468,16 +463,22 @@ public class JDialog extends Dialog implements WindowConstants,
} }
/** /**
* Creates a modeless dialog with the specified owner <code>Window</code> and * Creates a modeless dialog with the specified owner {@code Window} and
* an empty title. * an empty title.
* <p> * <p>
* This constructor sets the component's locale property to the value * This constructor sets the component's locale property to the value
* returned by <code>JComponent.getDefaultLocale</code>. * returned by {@code JComponent.getDefaultLocale}.
* *
* @param owner the <code>Window</code> from which the dialog is displayed or * @param owner the {@code Window} from which the dialog is displayed or
* <code>null</code> if this dialog has no owner * {@code null} if this dialog has no owner
* @exception HeadlessException when *
* <code>GraphicsEnvironment.isHeadless()</code> returns <code>true</code> * @throws IllegalArgumentException
* if the {@code owner} is not an instance of {@link java.awt.Dialog Dialog}
* or {@link java.awt.Frame Frame}
* @throws IllegalArgumentException
* if the {@code owner}'s {@code GraphicsConfiguration} is not from a screen device
* @throws HeadlessException
* when {@code GraphicsEnvironment.isHeadless()} returns {@code true}
* *
* @see java.awt.GraphicsEnvironment#isHeadless * @see java.awt.GraphicsEnvironment#isHeadless
* @see JComponent#getDefaultLocale * @see JComponent#getDefaultLocale
...@@ -489,19 +490,28 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -489,19 +490,28 @@ public class JDialog extends Dialog implements WindowConstants,
} }
/** /**
* Creates a dialog with the specified owner <code>Window</code>, modality * Creates a dialog with the specified owner {@code Window}, modality
* and an empty title. * and an empty title.
* <p> * <p>
* This constructor sets the component's locale property to the value * This constructor sets the component's locale property to the value
* returned by <code>JComponent.getDefaultLocale</code>. * returned by {@code JComponent.getDefaultLocale}.
* *
* @param owner the <code>Window</code> from which the dialog is displayed or * @param owner the {@code Window} from which the dialog is displayed or
* <code>null</code> if this dialog has no owner * {@code null} if this dialog has no owner
* @param modalityType specifies whether dialog blocks input to other * @param modalityType specifies whether dialog blocks input to other
* windows when shown. <code>null</code> value and unsupported modality * windows when shown. {@code null} value and unsupported modality
* types are equivalent to <code>MODELESS</code> * types are equivalent to {@code MODELESS}
* @exception HeadlessException when *
* <code>GraphicsEnvironment.isHeadless()</code> returns <code>true</code> * @throws IllegalArgumentException
* if the {@code owner} is not an instance of {@link java.awt.Dialog Dialog}
* or {@link java.awt.Frame Frame}
* @throws IllegalArgumentException
* if the {@code owner}'s {@code GraphicsConfiguration} is not from a screen device
* @throws HeadlessException
* when {@code GraphicsEnvironment.isHeadless()} returns {@code true}
* @throws SecurityException
* if the calling thread does not have permission to create modal dialogs
* with the given {@code modalityType}
* *
* @see java.awt.Dialog.ModalityType * @see java.awt.Dialog.ModalityType
* @see java.awt.Dialog#setModal * @see java.awt.Dialog#setModal
...@@ -517,17 +527,23 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -517,17 +527,23 @@ public class JDialog extends Dialog implements WindowConstants,
/** /**
* Creates a modeless dialog with the specified title and owner * Creates a modeless dialog with the specified title and owner
* <code>Window</code>. * {@code Window}.
* <p> * <p>
* This constructor sets the component's locale property to the value * This constructor sets the component's locale property to the value
* returned by <code>JComponent.getDefaultLocale</code>. * returned by {@code JComponent.getDefaultLocale}.
*
* @param owner the {@code Window} from which the dialog is displayed or
* {@code null} if this dialog has no owner
* @param title the {@code String} to display in the dialog's
* title bar or {@code null} if the dialog has no title
* *
* @param owner the <code>Window</code> from which the dialog is displayed or * @throws IllegalArgumentException
* <code>null</code> if this dialog has no owner * if the {@code owner} is not an instance of {@link java.awt.Dialog Dialog}
* @param title the <code>String</code> to display in the dialog's * or {@link java.awt.Frame Frame}
* title bar or <code>null</code> if the dialog has no title * @throws IllegalArgumentException
* @exception java.awt.HeadlessException when * if the {@code owner}'s {@code GraphicsConfiguration} is not from a screen device
* <code>GraphicsEnvironment.isHeadless()</code> returns <code>true</code> * @throws HeadlessException
* when {@code GraphicsEnvironment.isHeadless()} returns {@code true}
* *
* @see java.awt.GraphicsEnvironment#isHeadless * @see java.awt.GraphicsEnvironment#isHeadless
* @see JComponent#getDefaultLocale * @see JComponent#getDefaultLocale
...@@ -539,21 +555,30 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -539,21 +555,30 @@ public class JDialog extends Dialog implements WindowConstants,
} }
/** /**
* Creates a dialog with the specified title, owner <code>Window</code> and * Creates a dialog with the specified title, owner {@code Window} and
* modality. * modality.
* <p> * <p>
* This constructor sets the component's locale property to the value * This constructor sets the component's locale property to the value
* returned by <code>JComponent.getDefaultLocale</code>. * returned by {@code JComponent.getDefaultLocale}.
* *
* @param owner the <code>Window</code> from which the dialog is displayed or * @param owner the {@code Window} from which the dialog is displayed or
* <code>null</code> if this dialog has no owner * {@code null} if this dialog has no owner
* @param title the <code>String</code> to display in the dialog's * @param title the {@code String} to display in the dialog's
* title bar or <code>null</code> if the dialog has no title * title bar or {@code null} if the dialog has no title
* @param modalityType specifies whether dialog blocks input to other * @param modalityType specifies whether dialog blocks input to other
* windows when shown. <code>null</code> value and unsupported modality * windows when shown. {@code null} value and unsupported modality
* types are equivalent to <code>MODELESS</code> * types are equivalent to {@code MODELESS}
* @exception java.awt.HeadlessException when *
* <code>GraphicsEnvironment.isHeadless()</code> returns <code>true</code> * @throws IllegalArgumentException
* if the {@code owner} is not an instance of {@link java.awt.Dialog Dialog}
* or {@link java.awt.Frame Frame}
* @throws IllegalArgumentException
* if the {@code owner}'s {@code GraphicsConfiguration} is not from a screen device
* @throws HeadlessException
* when {@code GraphicsEnvironment.isHeadless()} returns {@code true}
* @throws SecurityException
* if the calling thread does not have permission to create modal dialogs
* with the given {@code modalityType}
* *
* @see java.awt.Dialog.ModalityType * @see java.awt.Dialog.ModalityType
* @see java.awt.Dialog#setModal * @see java.awt.Dialog#setModal
...@@ -569,29 +594,38 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -569,29 +594,38 @@ public class JDialog extends Dialog implements WindowConstants,
} }
/** /**
* Creates a dialog with the specified title, owner <code>Window</code>, * Creates a dialog with the specified title, owner {@code Window},
* modality and <code>GraphicsConfiguration</code>. * modality and {@code GraphicsConfiguration}.
* <p> * <p>
* NOTE: Any popup components (<code>JComboBox</code>, * NOTE: Any popup components ({@code JComboBox},
* <code>JPopupMenu</code>, <code>JMenuBar</code>) * {@code JPopupMenu}, {@code JMenuBar})
* created within a modal dialog will be forced to be lightweight. * created within a modal dialog will be forced to be lightweight.
* <p> * <p>
* This constructor sets the component's locale property to the value * This constructor sets the component's locale property to the value
* returned by <code>JComponent.getDefaultLocale</code>. * returned by {@code JComponent.getDefaultLocale}.
* *
* @param owner the <code>Window</code> from which the dialog is displayed or * @param owner the {@code Window} from which the dialog is displayed or
* <code>null</code> if this dialog has no owner * {@code null} if this dialog has no owner
* @param title the <code>String</code> to display in the dialog's * @param title the {@code String} to display in the dialog's
* title bar or <code>null</code> if the dialog has no title * title bar or {@code null} if the dialog has no title
* @param modalityType specifies whether dialog blocks input to other * @param modalityType specifies whether dialog blocks input to other
* windows when shown. <code>null</code> value and unsupported modality * windows when shown. {@code null} value and unsupported modality
* types are equivalent to <code>MODELESS</code> * types are equivalent to {@code MODELESS}
* @param gc the <code>GraphicsConfiguration</code> of the target screen device; * @param gc the {@code GraphicsConfiguration} of the target screen device;
* if <code>null</code>, the <code>GraphicsConfiguration</code> from the owning * if {@code null}, the {@code GraphicsConfiguration} from the owning
* window is used; if <code>owner</code> is also <code>null</code>, the * window is used; if {@code owner} is also {@code null}, the
* system default <code>GraphicsConfiguration</code> is assumed * system default {@code GraphicsConfiguration} is assumed
* @exception java.awt.HeadlessException when *
* <code>GraphicsEnvironment.isHeadless()</code> returns <code>true</code> * @throws IllegalArgumentException
* if the {@code owner} is not an instance of {@link java.awt.Dialog Dialog}
* or {@link java.awt.Frame Frame}
* @throws IllegalArgumentException
* if the {@code owner}'s {@code GraphicsConfiguration} is not from a screen device
* @throws HeadlessException
* when {@code GraphicsEnvironment.isHeadless()} returns {@code true}
* @throws SecurityException
* if the calling thread does not have permission to create modal dialogs
* with the given {@code modalityType}
* *
* @see java.awt.Dialog.ModalityType * @see java.awt.Dialog.ModalityType
* @see java.awt.Dialog#setModal * @see java.awt.Dialog#setModal
...@@ -608,7 +642,7 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -608,7 +642,7 @@ public class JDialog extends Dialog implements WindowConstants,
} }
/** /**
* Called by the constructors to init the <code>JDialog</code> properly. * Called by the constructors to init the {@code JDialog} properly.
*/ */
protected void dialogInit() { protected void dialogInit() {
enableEvents(AWTEvent.KEY_EVENT_MASK | AWTEvent.WINDOW_EVENT_MASK); enableEvents(AWTEvent.KEY_EVENT_MASK | AWTEvent.WINDOW_EVENT_MASK);
...@@ -628,7 +662,7 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -628,7 +662,7 @@ public class JDialog extends Dialog implements WindowConstants,
/** /**
* Called by the constructor methods to create the default * Called by the constructor methods to create the default
* <code>rootPane</code>. * {@code rootPane}.
*/ */
protected JRootPane createRootPane() { protected JRootPane createRootPane() {
JRootPane rp = new JRootPane(); JRootPane rp = new JRootPane();
...@@ -642,7 +676,7 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -642,7 +676,7 @@ public class JDialog extends Dialog implements WindowConstants,
/** /**
* Handles window events depending on the state of the * Handles window events depending on the state of the
* <code>defaultCloseOperation</code> property. * {@code defaultCloseOperation} property.
* *
* @see #setDefaultCloseOperation * @see #setDefaultCloseOperation
*/ */
...@@ -671,26 +705,26 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -671,26 +705,26 @@ public class JDialog extends Dialog implements WindowConstants,
* You must specify one of the following choices: * You must specify one of the following choices:
* <p> * <p>
* <ul> * <ul>
* <li><code>DO_NOTHING_ON_CLOSE</code> * <li>{@code DO_NOTHING_ON_CLOSE}
* (defined in <code>WindowConstants</code>): * (defined in {@code WindowConstants}):
* Don't do anything; require the * Don't do anything; require the
* program to handle the operation in the <code>windowClosing</code> * program to handle the operation in the {@code windowClosing}
* method of a registered <code>WindowListener</code> object. * method of a registered {@code WindowListener} object.
* *
* <li><code>HIDE_ON_CLOSE</code> * <li>{@code HIDE_ON_CLOSE}
* (defined in <code>WindowConstants</code>): * (defined in {@code WindowConstants}):
* Automatically hide the dialog after * Automatically hide the dialog after
* invoking any registered <code>WindowListener</code> * invoking any registered {@code WindowListener}
* objects. * objects.
* *
* <li><code>DISPOSE_ON_CLOSE</code> * <li>{@code DISPOSE_ON_CLOSE}
* (defined in <code>WindowConstants</code>): * (defined in {@code WindowConstants}):
* Automatically hide and dispose the * Automatically hide and dispose the
* dialog after invoking any registered <code>WindowListener</code> * dialog after invoking any registered {@code WindowListener}
* objects. * objects.
* </ul> * </ul>
* <p> * <p>
* The value is set to <code>HIDE_ON_CLOSE</code> by default. Changes * The value is set to {@code HIDE_ON_CLOSE} by default. Changes
* to the value of this property cause the firing of a property * to the value of this property cause the firing of a property
* change event, with property name "defaultCloseOperation". * change event, with property name "defaultCloseOperation".
* <p> * <p>
...@@ -779,9 +813,9 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -779,9 +813,9 @@ public class JDialog extends Dialog implements WindowConstants,
} }
/** /**
* Gets the <code>transferHandler</code> property. * Gets the {@code transferHandler} property.
* *
* @return the value of the <code>transferHandler</code> property * @return the value of the {@code transferHandler} property
* *
* @see TransferHandler * @see TransferHandler
* @see #setTransferHandler * @see #setTransferHandler
...@@ -792,10 +826,10 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -792,10 +826,10 @@ public class JDialog extends Dialog implements WindowConstants,
} }
/** /**
* Calls <code>paint(g)</code>. This method was overridden to * Calls {@code paint(g)}. This method was overridden to
* prevent an unnecessary call to clear the background. * prevent an unnecessary call to clear the background.
* *
* @param g the <code>Graphics</code> context in which to paint * @param g the {@code Graphics} context in which to paint
*/ */
public void update(Graphics g) { public void update(Graphics g) {
paint(g); paint(g);
...@@ -827,10 +861,10 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -827,10 +861,10 @@ public class JDialog extends Dialog implements WindowConstants,
/** /**
* Returns whether calls to <code>add</code> and * Returns whether calls to {@code add} and
* <code>setLayout</code> are forwarded to the <code>contentPane</code>. * {@code setLayout} are forwarded to the {@code contentPane}.
* *
* @return true if <code>add</code> and <code>setLayout</code> * @return true if {@code add} and {@code setLayout}
* are fowarded; false otherwise * are fowarded; false otherwise
* *
* @see #addImpl * @see #addImpl
...@@ -844,12 +878,12 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -844,12 +878,12 @@ public class JDialog extends Dialog implements WindowConstants,
/** /**
* Sets whether calls to <code>add</code> and * Sets whether calls to {@code add} and
* <code>setLayout</code> are forwarded to the <code>contentPane</code>. * {@code setLayout} are forwarded to the {@code contentPane}.
* *
* @param enabled true if <code>add</code> and <code>setLayout</code> * @param enabled true if {@code add} and {@code setLayout}
* are forwarded, false if they should operate directly on the * are forwarded, false if they should operate directly on the
* <code>JDialog</code>. * {@code JDialog}.
* *
* @see #addImpl * @see #addImpl
* @see #setLayout * @see #setLayout
...@@ -864,20 +898,20 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -864,20 +898,20 @@ public class JDialog extends Dialog implements WindowConstants,
} }
/** /**
* Adds the specified child <code>Component</code>. * Adds the specified child {@code Component}.
* This method is overridden to conditionally forward calls to the * This method is overridden to conditionally forward calls to the
* <code>contentPane</code>. * {@code contentPane}.
* By default, children are added to the <code>contentPane</code> instead * By default, children are added to the {@code contentPane} instead
* of the frame, refer to {@link javax.swing.RootPaneContainer} for * of the frame, refer to {@link javax.swing.RootPaneContainer} for
* details. * details.
* *
* @param comp the component to be enhanced * @param comp the component to be enhanced
* @param constraints the constraints to be respected * @param constraints the constraints to be respected
* @param index the index * @param index the index
* @exception IllegalArgumentException if <code>index</code> is invalid * @throws IllegalArgumentException if {@code index} is invalid
* @exception IllegalArgumentException if adding the container's parent * @throws IllegalArgumentException if adding the container's parent
* to itself * to itself
* @exception IllegalArgumentException if adding a window to a container * @throws IllegalArgumentException if adding a window to a container
* *
* @see #setRootPaneCheckingEnabled * @see #setRootPaneCheckingEnabled
* @see javax.swing.RootPaneContainer * @see javax.swing.RootPaneContainer
...@@ -894,13 +928,13 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -894,13 +928,13 @@ public class JDialog extends Dialog implements WindowConstants,
/** /**
* Removes the specified component from the container. If * Removes the specified component from the container. If
* <code>comp</code> is not the <code>rootPane</code>, this will forward * {@code comp} is not the {@code rootPane}, this will forward
* the call to the <code>contentPane</code>. This will do nothing if * the call to the {@code contentPane}. This will do nothing if
* <code>comp</code> is not a child of the <code>JDialog</code> or * {@code comp} is not a child of the {@code JDialog} or
* <code>contentPane</code>. * {@code contentPane}.
* *
* @param comp the component to be removed * @param comp the component to be removed
* @throws NullPointerException if <code>comp</code> is null * @throws NullPointerException if {@code comp} is null
* @see #add * @see #add
* @see javax.swing.RootPaneContainer * @see javax.swing.RootPaneContainer
*/ */
...@@ -914,13 +948,13 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -914,13 +948,13 @@ public class JDialog extends Dialog implements WindowConstants,
/** /**
* Sets the <code>LayoutManager</code>. * Sets the {@code LayoutManager}.
* Overridden to conditionally forward the call to the * Overridden to conditionally forward the call to the
* <code>contentPane</code>. * {@code contentPane}.
* Refer to {@link javax.swing.RootPaneContainer} for * Refer to {@link javax.swing.RootPaneContainer} for
* more information. * more information.
* *
* @param manager the <code>LayoutManager</code> * @param manager the {@code LayoutManager}
* @see #setRootPaneCheckingEnabled * @see #setRootPaneCheckingEnabled
* @see javax.swing.RootPaneContainer * @see javax.swing.RootPaneContainer
*/ */
...@@ -935,7 +969,7 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -935,7 +969,7 @@ public class JDialog extends Dialog implements WindowConstants,
/** /**
* Returns the <code>rootPane</code> object for this dialog. * Returns the {@code rootPane} object for this dialog.
* *
* @see #setRootPane * @see #setRootPane
* @see RootPaneContainer#getRootPane * @see RootPaneContainer#getRootPane
...@@ -946,10 +980,10 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -946,10 +980,10 @@ public class JDialog extends Dialog implements WindowConstants,
/** /**
* Sets the <code>rootPane</code> property. * Sets the {@code rootPane} property.
* This method is called by the constructor. * This method is called by the constructor.
* *
* @param root the <code>rootPane</code> object for this dialog * @param root the {@code rootPane} object for this dialog
* *
* @see #getRootPane * @see #getRootPane
* *
...@@ -976,9 +1010,9 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -976,9 +1010,9 @@ public class JDialog extends Dialog implements WindowConstants,
/** /**
* Returns the <code>contentPane</code> object for this dialog. * Returns the {@code contentPane} object for this dialog.
* *
* @return the <code>contentPane</code> property * @return the {@code contentPane} property
* *
* @see #setContentPane * @see #setContentPane
* @see RootPaneContainer#getContentPane * @see RootPaneContainer#getContentPane
...@@ -989,19 +1023,19 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -989,19 +1023,19 @@ public class JDialog extends Dialog implements WindowConstants,
/** /**
* Sets the <code>contentPane</code> property. * Sets the {@code contentPane} property.
* This method is called by the constructor. * This method is called by the constructor.
* <p> * <p>
* Swing's painting architecture requires an opaque <code>JComponent</code> * Swing's painting architecture requires an opaque {@code JComponent}
* in the containment hiearchy. This is typically provided by the * in the containment hiearchy. This is typically provided by the
* content pane. If you replace the content pane it is recommended you * content pane. If you replace the content pane it is recommended you
* replace it with an opaque <code>JComponent</code>. * replace it with an opaque {@code JComponent}.
* @see JRootPane * @see JRootPane
* *
* @param contentPane the <code>contentPane</code> object for this dialog * @param contentPane the {@code contentPane} object for this dialog
* *
* @exception java.awt.IllegalComponentStateException (a runtime * @throws java.awt.IllegalComponentStateException (a runtime
* exception) if the content pane parameter is <code>null</code> * exception) if the content pane parameter is {@code null}
* @see #getContentPane * @see #getContentPane
* @see RootPaneContainer#setContentPane * @see RootPaneContainer#setContentPane
* *
...@@ -1015,9 +1049,9 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -1015,9 +1049,9 @@ public class JDialog extends Dialog implements WindowConstants,
} }
/** /**
* Returns the <code>layeredPane</code> object for this dialog. * Returns the {@code layeredPane} object for this dialog.
* *
* @return the <code>layeredPane</code> property * @return the {@code layeredPane} property
* *
* @see #setLayeredPane * @see #setLayeredPane
* @see RootPaneContainer#getLayeredPane * @see RootPaneContainer#getLayeredPane
...@@ -1027,12 +1061,12 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -1027,12 +1061,12 @@ public class JDialog extends Dialog implements WindowConstants,
} }
/** /**
* Sets the <code>layeredPane</code> property. * Sets the {@code layeredPane} property.
* This method is called by the constructor. * This method is called by the constructor.
* *
* @param layeredPane the new <code>layeredPane</code> property * @param layeredPane the new {@code layeredPane} property
* *
* @exception java.awt.IllegalComponentStateException (a runtime * @throws java.awt.IllegalComponentStateException (a runtime
* exception) if the layered pane parameter is null * exception) if the layered pane parameter is null
* @see #getLayeredPane * @see #getLayeredPane
* @see RootPaneContainer#setLayeredPane * @see RootPaneContainer#setLayeredPane
...@@ -1046,9 +1080,9 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -1046,9 +1080,9 @@ public class JDialog extends Dialog implements WindowConstants,
} }
/** /**
* Returns the <code>glassPane</code> object for this dialog. * Returns the {@code glassPane} object for this dialog.
* *
* @return the <code>glassPane</code> property * @return the {@code glassPane} property
* *
* @see #setGlassPane * @see #setGlassPane
* @see RootPaneContainer#getGlassPane * @see RootPaneContainer#getGlassPane
...@@ -1058,10 +1092,10 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -1058,10 +1092,10 @@ public class JDialog extends Dialog implements WindowConstants,
} }
/** /**
* Sets the <code>glassPane</code> property. * Sets the {@code glassPane} property.
* This method is called by the constructor. * This method is called by the constructor.
* *
* @param glassPane the <code>glassPane</code> object for this dialog * @param glassPane the {@code glassPane} object for this dialog
* @see #getGlassPane * @see #getGlassPane
* @see RootPaneContainer#setGlassPane * @see RootPaneContainer#setGlassPane
* *
...@@ -1085,7 +1119,7 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -1085,7 +1119,7 @@ public class JDialog extends Dialog implements WindowConstants,
/** /**
* Repaints the specified rectangle of this component within * Repaints the specified rectangle of this component within
* <code>time</code> milliseconds. Refer to <code>RepaintManager</code> * {@code time} milliseconds. Refer to {@code RepaintManager}
* for details on how the repaint is handled. * for details on how the repaint is handled.
* *
* @param time maximum time in milliseconds before update * @param time maximum time in milliseconds before update
...@@ -1107,15 +1141,15 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -1107,15 +1141,15 @@ public class JDialog extends Dialog implements WindowConstants,
} }
/** /**
* Provides a hint as to whether or not newly created <code>JDialog</code>s * Provides a hint as to whether or not newly created {@code JDialog}s
* should have their Window decorations (such as borders, widgets to * should have their Window decorations (such as borders, widgets to
* close the window, title...) provided by the current look * close the window, title...) provided by the current look
* and feel. If <code>defaultLookAndFeelDecorated</code> is true, * and feel. If {@code defaultLookAndFeelDecorated} is true,
* the current <code>LookAndFeel</code> supports providing window * the current {@code LookAndFeel} supports providing window
* decorations, and the current window manager supports undecorated * decorations, and the current window manager supports undecorated
* windows, then newly created <code>JDialog</code>s will have their * windows, then newly created {@code JDialog}s will have their
* Window decorations provided by the current <code>LookAndFeel</code>. * Window decorations provided by the current {@code LookAndFeel}.
* Otherwise, newly created <code>JDialog</code>s will have their * Otherwise, newly created {@code JDialog}s will have their
* Window decorations provided by the current window manager. * Window decorations provided by the current window manager.
* <p> * <p>
* You can get the same effect on a single JDialog by doing the following: * You can get the same effect on a single JDialog by doing the following:
...@@ -1139,7 +1173,7 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -1139,7 +1173,7 @@ public class JDialog extends Dialog implements WindowConstants,
} }
/** /**
* Returns true if newly created <code>JDialog</code>s should have their * Returns true if newly created {@code JDialog}s should have their
* Window decorations provided by the current look and feel. This is only * Window decorations provided by the current look and feel. This is only
* a hint, as certain look and feels may not support this feature. * a hint, as certain look and feels may not support this feature.
* *
...@@ -1156,14 +1190,14 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -1156,14 +1190,14 @@ public class JDialog extends Dialog implements WindowConstants,
} }
/** /**
* Returns a string representation of this <code>JDialog</code>. * Returns a string representation of this {@code JDialog}.
* This method * This method
* is intended to be used only for debugging purposes, and the * is intended to be used only for debugging purposes, and the
* content and format of the returned string may vary between * content and format of the returned string may vary between
* implementations. The returned string may be empty but may not * implementations. The returned string may be empty but may not
* be <code>null</code>. * be {@code null}.
* *
* @return a string representation of this <code>JDialog</code>. * @return a string representation of this {@code JDialog}.
*/ */
protected String paramString() { protected String paramString() {
String defaultCloseOperationString; String defaultCloseOperationString;
...@@ -1210,7 +1244,7 @@ public class JDialog extends Dialog implements WindowConstants, ...@@ -1210,7 +1244,7 @@ public class JDialog extends Dialog implements WindowConstants,
/** /**
* This class implements accessibility support for the * This class implements accessibility support for the
* <code>JDialog</code> class. It provides an implementation of the * {@code JDialog} class. It provides an implementation of the
* Java Accessibility API appropriate to dialog user-interface * Java Accessibility API appropriate to dialog user-interface
* elements. * elements.
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册