Class ExternalFrame

All Implemented Interfaces:
ComponentListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants, IFrame

public class ExternalFrame extends JDialog implements IFrame, ComponentListener
Author:
Cesar Martinez Izquierdo invalid input: '<'cesar.martinez@iver.es>
See Also:
  • Constructor Details

    • ExternalFrame

      public ExternalFrame() throws HeadlessException
      Creates a non-modal dialog without a title and without a specified Frame owner. A shared, hidden frame will be set as the owner of the dialog.

      This constructor sets the component's locale property to the value returned by JComponent.getDefaultLocale.

      Throws:
      HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
      See Also:
    • ExternalFrame

      public ExternalFrame(Frame owner) throws HeadlessException
      Creates a non-modal dialog without a title with the specified Frame as its owner. If owner is null, a shared, hidden frame will be set as the owner of the dialog.

      This constructor sets the component's locale property to the value returned by JComponent.getDefaultLocale.

      Parameters:
      owner - the Frame from which the dialog is displayed
      Throws:
      HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
      See Also:
    • ExternalFrame

      public ExternalFrame(Frame owner, boolean modal) throws HeadlessException
      Creates a modal or non-modal dialog without a title and with the specified owner Frame. If owner is null, a shared, hidden frame will be set as the owner of the dialog.

      This constructor sets the component's locale property to the value returned by JComponent.getDefaultLocale.

      Parameters:
      owner - the Frame from which the dialog is displayed
      modal - true for a modal dialog, false for one that allows others windows to be active at the same time
      Throws:
      HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
      See Also:
    • ExternalFrame

      public ExternalFrame(Frame owner, String title) throws HeadlessException
      Creates a non-modal dialog with the specified title and with the specified owner frame. If owner is null, a shared, hidden frame will be set as the owner of the dialog.

      This constructor sets the component's locale property to the value returned by JComponent.getDefaultLocale.

      Parameters:
      owner - the Frame from which the dialog is displayed
      title - the String to display in the dialog's title bar
      Throws:
      HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
      See Also:
    • ExternalFrame

      public ExternalFrame(Frame owner, String title, boolean modal) throws HeadlessException
      Creates a modal or non-modal dialog with the specified title and the specified owner Frame. If owner is null, a shared, hidden frame will be set as the owner of this dialog. All constructors defer to this one.

      NOTE: Any popup components (JComboBox, JPopupMenu, JMenuBar) created within a modal dialog will be forced to be lightweight.

      This constructor sets the component's locale property to the value returned by JComponent.getDefaultLocale.

      Parameters:
      owner - the Frame from which the dialog is displayed
      title - the String to display in the dialog's title bar
      modal - true for a modal dialog, false for one that allows other windows to be active at the same time
      Throws:
      HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
      See Also:
    • ExternalFrame

      public ExternalFrame(Dialog owner) throws HeadlessException
      Creates a non-modal dialog without a title with the specified Dialog as its owner.

      This constructor sets the component's locale property to the value returned by JComponent.getDefaultLocale.

      Parameters:
      owner - the non-null Dialog from which the dialog is displayed
      Throws:
      HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
      See Also:
    • ExternalFrame

      public ExternalFrame(Dialog owner, boolean modal) throws HeadlessException
      Creates a modal or non-modal dialog without a title and with the specified owner dialog.

      This constructor sets the component's locale property to the value returned by JComponent.getDefaultLocale.

      Parameters:
      owner - the non-null Dialog from which the dialog is displayed
      modal - true for a modal dialog, false for one that allows other windows to be active at the same time
      Throws:
      HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
      See Also:
    • ExternalFrame

      public ExternalFrame(Dialog owner, String title) throws HeadlessException
      Creates a non-modal dialog with the specified title and with the specified owner dialog.

      This constructor sets the component's locale property to the value returned by JComponent.getDefaultLocale.

      Parameters:
      owner - the non-null Dialog from which the dialog is displayed
      title - the String to display in the dialog's title bar
      Throws:
      HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
      See Also:
    • ExternalFrame

      public ExternalFrame(Dialog owner, String title, boolean modal) throws HeadlessException
      Creates a modal or non-modal dialog with the specified title and the specified owner frame.

      This constructor sets the component's locale property to the value returned by JComponent.getDefaultLocale.

      Parameters:
      owner - the non-null Dialog from which the dialog is displayed
      title - the String to display in the dialog's title bar
      modal - true for a modal dialog, false for one that allows other windows to be active at the same time
      Throws:
      HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
      See Also:
  • Method Details

    • setHeight

      public void setHeight(int height)
      Description copied from interface: IFrame
      Sets the window height.
      Specified by:
      setHeight in interface IFrame
      Parameters:
      height - the window height (in pixels)
    • setWidth

      public void setWidth(int width)
      Description copied from interface: IFrame
      Sets the window width.
      Specified by:
      setWidth in interface IFrame
    • setX

      public void setX(int x)
      Description copied from interface: IFrame
      Sets the value of the x coordinate for the origin of the associated window.
      Specified by:
      setX in interface IFrame
      Parameters:
      x - The value (in pixels) of the x coordinate
    • setY

      public void setY(int y)
      Description copied from interface: IFrame
      Sets the value of the y coordinate for the origin of the associated window.
      Specified by:
      setY in interface IFrame
      Parameters:
      y - The value (in pixels) of the y coordinate
    • getMinimumSize

      public Dimension getMinimumSize()
      Description copied from interface: IFrame
      Gets the minimum allowed size for this window.
      Specified by:
      getMinimumSize in interface IFrame
      Overrides:
      getMinimumSize in class Container
      Returns:
      minSize The minimum allowed size for this window.
    • setMinimumSize

      public void setMinimumSize(Dimension minSize)
      Description copied from interface: IFrame
      Sets the minimum allowed size for this window. If null is provided, the minimum size is disabled (and thus the window can be resized to any size).
      Specified by:
      setMinimumSize in interface IFrame
      Overrides:
      setMinimumSize in class Window
      Parameters:
      minSize - The minimum allowed size for this window.
    • componentHidden

      public void componentHidden(ComponentEvent e)
      Specified by:
      componentHidden in interface ComponentListener
    • componentMoved

      public void componentMoved(ComponentEvent e)
      Specified by:
      componentMoved in interface ComponentListener
    • componentResized

      public void componentResized(ComponentEvent e)
      Specified by:
      componentResized in interface ComponentListener
    • componentShown

      public void componentShown(ComponentEvent e)
      Specified by:
      componentShown in interface ComponentListener