com.iternum.swlink.activator
Class PropertyChangeActivator

java.lang.Object
  extended bycom.iternum.swlink.activator.AbstractActivator
      extended bycom.iternum.swlink.activator.PropertyChangeActivator
All Implemented Interfaces:
Activator, java.util.EventListener, java.beans.PropertyChangeListener

public class PropertyChangeActivator
extends AbstractActivator
implements java.beans.PropertyChangeListener

Author:
Karl F. Banke The activator object that uses a property change as its source.

Field Summary
static java.lang.String PARAM_SOURCE_PROPERTY
          Property for parametrization.
 
Constructor Summary
PropertyChangeActivator()
          Default Constructor.
PropertyChangeActivator(java.lang.String pSourcePropertyName)
          Create a unidirectional property change link.
 
Method Summary
protected  void deregisterFromSource()
          Deregister this link from its source.
 void propertyChange(java.beans.PropertyChangeEvent pEvt)
          Invoke action if property change activates link.
protected  void registerWithSource()
          Register this link with its source.
 void setActivatorParam(java.util.Map pParam)
          Sets the activator filter params.
 
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_SOURCE_PROPERTY

public static final java.lang.String PARAM_SOURCE_PROPERTY
Property for parametrization.

See Also:
Constant Field Values
Constructor Detail

PropertyChangeActivator

public PropertyChangeActivator()
Default Constructor.


PropertyChangeActivator

public PropertyChangeActivator(java.lang.String pSourcePropertyName)
Create a unidirectional property change link.

Parameters:
pSourcePropertyName - The name of the source property
Method Detail

registerWithSource

protected final void registerWithSource()
Register this link with its source.

Specified by:
registerWithSource in class AbstractActivator

deregisterFromSource

protected void deregisterFromSource()
Deregister this link from its source.

Specified by:
deregisterFromSource in class AbstractActivator

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent pEvt)
Invoke action if property change activates link. In case the property name of the PropertyChangeEvent is equal to the source property name or the source property name is not set the currently set action for the link is performed.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Parameters:
pEvt - The incoming property change event
See Also:
(java.beans.PropertyChangeEvent)

setActivatorParam

public void setActivatorParam(java.util.Map pParam)
Description copied from interface: Activator
Sets the activator filter params. The params can be used to configure the activator. For example, for a property change activator, a typical param would be the String propertyName.

Specified by:
setActivatorParam in interface Activator
Parameters:
pParam - A Map containing a String property name used to activate this link.