info.aduna.swing
Class WindowUtil

java.lang.Object
  extended by info.aduna.swing.WindowUtil

public final class WindowUtil
extends Object

Various utilities for use on AWT/Swing windows.


Constructor Summary
WindowUtil()
           
 
Method Summary
static void enableEscapeKey(Window window)
          Enables the escape key for the given window, such that pressing the escape key closes the window.
static void enableEscapeKey(Window window, ActionListener actionListener)
          Enables the escape key for the given window, such that pressing the escape key performs the given action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WindowUtil

public WindowUtil()
Method Detail

enableEscapeKey

public static void enableEscapeKey(Window window)
Enables the escape key for the given window, such that pressing the escape key closes the window.

Parameters:
window - The window for which the escape key needs to be enabled

enableEscapeKey

public static void enableEscapeKey(Window window,
                                   ActionListener actionListener)
Enables the escape key for the given window, such that pressing the escape key performs the given action.

Parameters:
window - The window for which the escape key needs to be enabled
actionListener - Defines what action should be performed when the escape key is entered


Copyright © 1997-2008 Aduna. All Rights Reserved.