Class JEscDialog

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class JEscDialog extends JDialog
Extends the dialog window as defined by Swing adding the possibility to close the dialog using the ESC key. The ESC key can be associated with an action that disposes the dialog or with an action that just hides the dialog.
Version:
1.1
Author:
Riccardo Govoni, Ivan Pribela
See Also:
  • Constructor Details

    • JEscDialog

      public JEscDialog(boolean disposeOnEsc) throws HeadlessException
      Creates a new dialog window.
      Parameters:
      disposeOnEsc - true if the dialog is to be disposed when ESC is pressed, false if the dialog should just become invisible.
      Throws:
      HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
    • JEscDialog

      public JEscDialog(Dialog owner, boolean disposeOnEsc) throws HeadlessException
      Creates a new dialog window.
      Parameters:
      owner - the dialog owner
      disposeOnEsc - true if the dialog is to be disposed when ESC is pressed, false if the dialog should just become invisible.
      Throws:
      HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
    • JEscDialog

      public JEscDialog(Dialog owner, boolean modal, boolean disposeOnEsc) throws HeadlessException
      Creates a new dialog window.
      Parameters:
      owner - the dialog owner
      modal - true for a modal dialog, false for one that allows other windows to be active at the same time
      disposeOnEsc - true if the dialog is to be disposed when ESC is pressed, false if the dialog should just become invisible.
      Throws:
      HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
    • JEscDialog

      public JEscDialog(Frame owner, boolean disposeOnEsc) throws HeadlessException
      Creates a new dialog window.
      Parameters:
      owner - the dialog owner
      disposeOnEsc - true if the dialog is to be disposed when ESC is pressed, false if the dialog should just become invisible.
      Throws:
      HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
    • JEscDialog

      public JEscDialog(Frame owner, boolean modal, boolean disposeOnEsc) throws HeadlessException
      Creates a new dialog window.
      Parameters:
      owner - the dialog owner
      modal - true for a modal dialog, false for one that allows other windows to be active at the same time
      disposeOnEsc - true if the dialog is to be disposed when ESC is pressed, false if the dialog should just become invisible.
      Throws:
      HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
    • JEscDialog

      public JEscDialog(Dialog owner, String title, boolean disposeOnEsc) throws HeadlessException
      Creates a new dialog window.
      Parameters:
      owner - the dialog owner
      title - the dialog title
      disposeOnEsc - true if the dialog is to be disposed when ESC is pressed, false if the dialog should just become invisible.
      Throws:
      HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
    • JEscDialog

      public JEscDialog(Dialog owner, String title, boolean modal, boolean disposeOnEsc) throws HeadlessException
      Creates a new dialog window.
      Parameters:
      owner - the dialog owner
      title - the dialog title
      modal - true for a modal dialog, false for one that allows other windows to be active at the same time
      disposeOnEsc - true if the dialog is to be disposed when ESC is pressed, false if the dialog should just become invisible.
      Throws:
      HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
    • JEscDialog

      public JEscDialog(Frame owner, String title, boolean disposeOnEsc) throws HeadlessException
      Creates a new dialog window.
      Parameters:
      owner - the dialog owner
      title - the dialog title
      disposeOnEsc - true if the dialog is to be disposed when ESC is pressed, false if the dialog should just become invisible.
      Throws:
      HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
    • JEscDialog

      public JEscDialog(Frame owner, String title, boolean modal, boolean disposeOnEsc) throws HeadlessException
      Creates a new dialog window.
      Parameters:
      owner - the dialog owner
      title - the dialog title
      modal - true for a modal dialog, false for one that allows other windows to be active at the same time
      disposeOnEsc - true if the dialog is to be disposed when ESC is pressed, false if the dialog should just become invisible.
      Throws:
      HeadlessException - if GraphicsEnvironment.isHeadless() returns true.