de.tkuhn.swing.actions
Class DelegatingAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by de.tkuhn.swing.actions.DelegatingAction
All Implemented Interfaces:
ForwardingAction, java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
Direct Known Subclasses:
BooleanPreferenceAction, BooleanStateAction

public class DelegatingAction
extends javax.swing.AbstractAction
implements ForwardingAction

This is an implementation of ForwardingAction that does simply nothing than forwarding all ActionEvents that arrive to the listners.

Version:
0.9.3
Author:
Tilmann Kuhn
See Also:
ForwardingAction, 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, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
DelegatingAction()
          Creates a new instance of DelegateAction
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent actionEvent)
          Implementation of actionPerformed() in ActionListener.
 void addActionListener(java.awt.event.ActionListener listener)
          Register a listener for events that arrive at the action.
 void removeActionListener(java.awt.event.ActionListener listener)
          Remove a listener from this Action's listener list.
 
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
 
Methods inherited from interface javax.swing.Action
addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 

Constructor Detail

DelegatingAction

public DelegatingAction()
Creates a new instance of DelegateAction

Method Detail

addActionListener

public void addActionListener(java.awt.event.ActionListener listener)
Register a listener for events that arrive at the action.

Specified by:
addActionListener in interface ForwardingAction
Parameters:
listener - the ActionListener

removeActionListener

public void removeActionListener(java.awt.event.ActionListener listener)
Remove a listener from this Action's listener list.

Specified by:
removeActionListener in interface ForwardingAction
Parameters:
listener - the ActionListener to be removed.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent actionEvent)
Implementation of actionPerformed() in ActionListener.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
actionEvent - the ActionEvent to be processed.


Copyright © Tilmann Kuhn