# com.bea.ide.util.swing
EscapeDialog Class

public class EscapeDialog
extends `JDialog`

dialog that closes when escape is pressed

Hierarchy
  `Object`
  `Component`
  `Container`
  `Window`
  `Dialog`
  `JDialog`
  `EscapeDialog`

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

Direct Known Subclasses
  `WizardDialog`

## Nested Class Summary

Nested classes from javax.swing`.`JDialog``
``JDialog.AccessibleJDialog``

Nested classes from java.awt`.`Dialog``
``Dialog.AccessibleAWTDialog``

Nested classes from java.awt`.`Window``
``Window.AccessibleAWTWindow``

Nested classes from java.awt`.`Container``
``Container.AccessibleAWTContainer``

Nested classes from java.awt`.`Component``
``Component.AccessibleAWTComponent`, `Component.BltBufferStrategy`, `Component.FlipBufferStrategy``

## Field Summary

Fields from javax.swing`.`JDialog``
`accessibleContext, rootPane, rootPaneCheckingEnabled`

Fields from java.awt`.`Component``
`BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT`

Fields from interface java.awt.image`.`ImageObserver``
`ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

Fields from interface javax.swing`.`WindowConstants``
`DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE`

## Constructor Summary

EscapeDialog() Default constructor.
EscapeDialog(`Dialog` owner, boolean modal) Creates a dialog with the specified owner and an empty dialog.
EscapeDialog(`Dialog` owner, `String` title, boolean modal) Creates a dialog with the given owner and title.
EscapeDialog(`Dialog` owner, `String` title) Creates a non-modal dialog with the specified owner and title.
EscapeDialog(`Dialog` owner) Creates a non-modal dialog with the given owner dialog and an empty title.
EscapeDialog(`Frame` owner, boolean modal) Creates a dialog with the specified owner and an empty dialog.
EscapeDialog(`Frame` owner, `String` title, boolean modal) Creates a dialog with the given owner and title.
EscapeDialog(`Frame` owner, `String` title) Creates a non-modal dialog with the specified owner and title.
EscapeDialog(`Frame` owner) Creates a non-modal dialog with the given owner frame and an empty title.

## Method Summary

`protected `JRootPane`` | `createRootPane`()
`public void` | `dispose`()
`protected `Action`` | `getEscapeListener`() This returns an action object that is invoked when the escape key is pressed.
`public `Dimension`` | `getMinimumSize`()
`public void` | `setDefaultButton`(`JButton` button) Set a button as the default (activated when the user hits enter)

Methods from `javax.swing.`JDialog``
`addImpl, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update`

Methods from `java.awt.`Dialog``
`addNotify, getAccessibleContext, getTitle, hide, isModal, isResizable, isUndecorated, paramString, setModal, setResizable, setTitle, setUndecorated, show`

Methods from `java.awt.`Window``
`addNotify, addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, finalize, getAccessibleContext, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront`

Methods from `java.awt.`Container``
`add, add, add, add, add, addContainerListener, addImpl, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree`

Methods from `java.awt.`Component``
`action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate`

Methods from class `java.lang.`Object``
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods from interface `javax.accessibility.`Accessible``
`getAccessibleContext`

Methods from interface `java.awt.image.`ImageObserver``
`imageUpdate`

Methods from interface `java.awt.`MenuContainer``
`getFont, postEvent, remove`

Methods from interface `javax.swing.`RootPaneContainer``
`getContentPane, getGlassPane, getLayeredPane, getRootPane, setContentPane, setGlassPane, setLayeredPane`

## Constructor Detail

### EscapeDialog

    public EscapeDialog()

  Default constructor. Creates an unparented, non-modal dialog with an empty title

### EscapeDialog

    public EscapeDialog(Dialog owner,
                        boolean modal)

  Creates a dialog with the specified owner and an empty dialog. Dialog is modal if true is passed non-modal otherwise.

### EscapeDialog

    public EscapeDialog(Dialog owner,
                        String title,
                        boolean modal)

  Creates a dialog with the given owner and title. Dialog is modal if true is passed, non-modal otherwise.

### EscapeDialog

    public EscapeDialog(Dialog owner,
                        String title)

  Creates a non-modal dialog with the specified owner and title.

### EscapeDialog

    public EscapeDialog(Dialog owner)

  Creates a non-modal dialog with the given owner dialog and an empty title.

### EscapeDialog

    public EscapeDialog(Frame owner,
                        boolean modal)

  Creates a dialog with the specified owner and an empty dialog. Dialog is modal if true is passed non-modal otherwise.

### EscapeDialog

    public EscapeDialog(Frame owner,
                        String title,
                        boolean modal)

  Creates a dialog with the given owner and title. Dialog is modal if true is passed, non-modal otherwise.

### EscapeDialog

    public EscapeDialog(Frame owner,
                        String title)

  Creates a non-modal dialog with the specified owner and title.

### EscapeDialog

    public EscapeDialog(Frame owner)

  Creates a non-modal dialog with the given owner frame and an empty title.

## Method Detail

### createRootPane() Method

    protected JRootPane createRootPane()

Overrides
  `JDialog.createRootPane()`

### dispose() Method

    public void dispose()

Overrides
  `Dialog.dispose()`

### getEscapeListener() Method

    protected Action getEscapeListener()

This returns an action object that is invoked when the escape key is pressed. The default behavior is to call dispose(). Derived classes may override it to change the behavior.

### getMinimumSize() Method

    public Dimension getMinimumSize()

Overrides
  `Container.getMinimumSize()`

### setDefaultButton(JButton) Method

    public void setDefaultButton(JButton button)

Set a button as the default (activated when the user hits enter)