src/share/classes/java/awt/Dialog.java

Print this page




  44 /**
  45  * A Dialog is a top-level window with a title and a border
  46  * that is typically used to take some form of input from the user.
  47  *
  48  * The size of the dialog includes any area designated for the
  49  * border.  The dimensions of the border area can be obtained
  50  * using the <code>getInsets</code> method, however, since
  51  * these dimensions are platform-dependent, a valid insets
  52  * value cannot be obtained until the dialog is made displayable
  53  * by either calling <code>pack</code> or <code>show</code>.
  54  * Since the border area is included in the overall size of the
  55  * dialog, the border effectively obscures a portion of the dialog,
  56  * constraining the area available for rendering and/or displaying
  57  * subcomponents to the rectangle which has an upper-left corner
  58  * location of <code>(insets.left, insets.top)</code>, and has a size of
  59  * <code>width - (insets.left + insets.right)</code> by
  60  * <code>height - (insets.top + insets.bottom)</code>.
  61  * <p>
  62  * The default layout for a dialog is <code>BorderLayout</code>.
  63  * <p>
  64  * A dialog may have its native decorations (i.e. Frame & Titlebar) turned off
  65  * with <code>setUndecorated</code>.  This can only be done while the dialog
  66  * is not {@link Component#isDisplayable() displayable}.
  67  * <p>
  68  * A dialog may have another window as its owner when it's constructed.  When
  69  * the owner window of a visible dialog is minimized, the dialog will
  70  * automatically be hidden from the user. When the owner window is subsequently
  71  * restored, the dialog is made visible to the user again.
  72  * <p>
  73  * In a multi-screen environment, you can create a <code>Dialog</code>
  74  * on a different screen device than its owner.  See {@link java.awt.Frame} for
  75  * more information.
  76  * <p>
  77  * A dialog can be either modeless (the default) or modal.  A modal
  78  * dialog is one which blocks input to some other top-level windows
  79  * in the application, except for any windows created with the dialog
  80  * as their owner. See <a href="doc-files/Modality.html">AWT Modality</a>
  81  * specification for details.
  82  * <p>
  83  * Dialogs are capable of generating the following
  84  * <code>WindowEvents</code>:




  44 /**
  45  * A Dialog is a top-level window with a title and a border
  46  * that is typically used to take some form of input from the user.
  47  *
  48  * The size of the dialog includes any area designated for the
  49  * border.  The dimensions of the border area can be obtained
  50  * using the <code>getInsets</code> method, however, since
  51  * these dimensions are platform-dependent, a valid insets
  52  * value cannot be obtained until the dialog is made displayable
  53  * by either calling <code>pack</code> or <code>show</code>.
  54  * Since the border area is included in the overall size of the
  55  * dialog, the border effectively obscures a portion of the dialog,
  56  * constraining the area available for rendering and/or displaying
  57  * subcomponents to the rectangle which has an upper-left corner
  58  * location of <code>(insets.left, insets.top)</code>, and has a size of
  59  * <code>width - (insets.left + insets.right)</code> by
  60  * <code>height - (insets.top + insets.bottom)</code>.
  61  * <p>
  62  * The default layout for a dialog is <code>BorderLayout</code>.
  63  * <p>
  64  * A dialog may have its native decorations (i.e. Frame &amp; Titlebar) turned off
  65  * with <code>setUndecorated</code>.  This can only be done while the dialog
  66  * is not {@link Component#isDisplayable() displayable}.
  67  * <p>
  68  * A dialog may have another window as its owner when it's constructed.  When
  69  * the owner window of a visible dialog is minimized, the dialog will
  70  * automatically be hidden from the user. When the owner window is subsequently
  71  * restored, the dialog is made visible to the user again.
  72  * <p>
  73  * In a multi-screen environment, you can create a <code>Dialog</code>
  74  * on a different screen device than its owner.  See {@link java.awt.Frame} for
  75  * more information.
  76  * <p>
  77  * A dialog can be either modeless (the default) or modal.  A modal
  78  * dialog is one which blocks input to some other top-level windows
  79  * in the application, except for any windows created with the dialog
  80  * as their owner. See <a href="doc-files/Modality.html">AWT Modality</a>
  81  * specification for details.
  82  * <p>
  83  * Dialogs are capable of generating the following
  84  * <code>WindowEvents</code>: