Groovy Documentation

com.wordpress.tipsforjava.swing
[Java] Class DefaultButtonListener

java.lang.Object
  com.wordpress.tipsforjava.swing.DefaultButtonListener
All Implemented Interfaces:
PropertyChangeListener

public class DefaultButtonListener
extends Object

Keep track of the default button and the temporary default button for all root panes in an application. The listener is installed for the entire application by using the static install() method. The listener can be removed for the application by using the static unInstall() method. This implies you could enable the listener for specific Windows only by using the above methods as a Window is activated and deactivated.

Authors:
Rob Camick
Darryl Burke


Field Summary
private static String PERMANENT_FOCUS_OWNER

private Component oldValue

private HashMap rootPanes

 
Constructor Summary
DefaultButtonListener()

 
Method Summary
static DefaultButtonListener install()

void propertyChange(PropertyChangeEvent e)

private void restoreDefaultButton(JRootPane rootPane)

private void setDefaultButton(JRootPane rootPane, JButton button)

static void unInstall(DefaultButtonListener listener)

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Field Detail

PERMANENT_FOCUS_OWNER

private static String PERMANENT_FOCUS_OWNER


oldValue

private Component oldValue


rootPanes

private HashMap rootPanes


 
Constructor Detail

DefaultButtonListener

DefaultButtonListener()


 
Method Detail

install

static DefaultButtonListener install()


propertyChange

public void propertyChange(PropertyChangeEvent e)


restoreDefaultButton

private void restoreDefaultButton(JRootPane rootPane)


setDefaultButton

private void setDefaultButton(JRootPane rootPane, JButton button)


unInstall

static void unInstall(DefaultButtonListener listener)


 

Groovy Documentation