com.iternum.swlink.activator
Class ActionEventActivator

java.lang.Object
  extended bycom.iternum.swlink.activator.AbstractActivator
      extended bycom.iternum.swlink.activator.ActionEventActivator
All Implemented Interfaces:
java.awt.event.ActionListener, Activator, java.util.EventListener

public class ActionEventActivator
extends AbstractActivator
implements java.awt.event.ActionListener

Author:
karlbanke An Activator that is activated by an incoming java.awt.ActionEvent. The Activator is registered as an ActionListen with its source.

Field Summary
static java.lang.String PARAM_COMMAND
          Parametrization constant.
 
Constructor Summary
ActionEventActivator()
          Creates an empty Link.
ActionEventActivator(java.lang.Object pSource)
          Creates an Activator with a source and a target.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent pEvt)
          Called if an action event occured on the source.
protected  void deregisterFromSource()
          Removes this Activator as an ActionListener from its source object.
protected  void registerWithSource()
          Adds this Activator as an ActionListener to its source object.
 void setActivatorParam(java.util.Map pParam)
          Set an ActionCommand for this Activator.
 
Methods inherited from class com.iternum.swlink.activator.AbstractActivator
close, getActivatable, getSource, setActivatable, setSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_COMMAND

public static final java.lang.String PARAM_COMMAND
Parametrization constant.

See Also:
Constant Field Values
Constructor Detail

ActionEventActivator

public ActionEventActivator()
Creates an empty Link.


ActionEventActivator

public ActionEventActivator(java.lang.Object pSource)
Creates an Activator with a source and a target.

Parameters:
pSource - the source object
Method Detail

registerWithSource

protected void registerWithSource()
Adds this Activator as an ActionListener to its source object.

Specified by:
registerWithSource in class AbstractActivator

deregisterFromSource

protected void deregisterFromSource()
Removes this Activator as an ActionListener from its source object.

Specified by:
deregisterFromSource in class AbstractActivator

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent pEvt)
Called if an action event occured on the source.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
pEvt - The Action Event

setActivatorParam

public void setActivatorParam(java.util.Map pParam)
Set an ActionCommand for this Activator.

Specified by:
setActivatorParam in interface Activator
Parameters:
pParam - A Map containing the action command with the key as defined in this class public constants.