org.progeeks.util.swing
Class ActionDelegateAdapter

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by org.progeeks.util.swing.ActionDelegateAdapter
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public class ActionDelegateAdapter
extends javax.swing.AbstractAction

A default Action implementation that used reflection to forward the actionPerformed call on to a configured method. Delegate methods have to be public.

Version:
$Revision: 1.2 $
Author:
Paul Speed
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
ActionDelegateAdapter(java.lang.String name, java.lang.Object delegate, java.lang.String methodName)
          Creates an action of the specified name that will delegate and actionPerformed calls to the specified delegate object by calling the specified method.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
           
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionDelegateAdapter

public ActionDelegateAdapter(java.lang.String name,
                             java.lang.Object delegate,
                             java.lang.String methodName)
Creates an action of the specified name that will delegate and actionPerformed calls to the specified delegate object by calling the specified method. If the method specified takes an ActionEvent then the event will be passed through as well.

Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)


Copyright © 2002-2003 Paul Speed. All Rights Reserved.