org.apache.log4j.chainsaw.helper
Class SwingHelper

java.lang.Object
  extended by org.apache.log4j.chainsaw.helper.SwingHelper

public final class SwingHelper
extends java.lang.Object

A collection of standard utility methods for use within Swing.

Author:
Paul Smith

Constructor Summary
SwingHelper()
           
 
Method Summary
static void centerOnScreen(java.awt.Component component)
          Centers the Component on screen.
static void configureCancelForDialog(javax.swing.JDialog dialog, javax.swing.JButton cancelButton)
          This method configures a standard Cancel action, bound to the ESC key, to dispose of the dialog, and sets the buttons action to be this action, and adds the action to the dialog's rootPane action map
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingHelper

public SwingHelper()
Method Detail

centerOnScreen

public static void centerOnScreen(java.awt.Component component)
Centers the Component on screen.

Parameters:
component -

configureCancelForDialog

public static void configureCancelForDialog(javax.swing.JDialog dialog,
                                            javax.swing.JButton cancelButton)
This method configures a standard Cancel action, bound to the ESC key, to dispose of the dialog, and sets the buttons action to be this action, and adds the action to the dialog's rootPane action map

Parameters:
dialog -
cancelButton -


Copyright © 2007 Apache Software Foundation. All Rights Reserved.