org.escot
Class BasicFeature

java.lang.Object
  |
  +--org.escot.BasicFeature
All Implemented Interfaces:
EscotFeature
Direct Known Subclasses:
BasicValue, FeatureWrapper, FunctionAdapter, PropertyAdapter

public abstract class BasicFeature
extends Object
implements EscotFeature

Basic implementation of the EscotFeature interface.


Field Summary
protected  int INITIAL_ATTR_CAPACITY
           
protected  Hashtable mAttributes
           
protected  PropertyChangeSupport mPCSupport
           
 
Fields inherited from interface org.escot.EscotFeature
COLOR_ATTRIBUTE, DESCRIPTION_ATTRIBUTE, ICON16x16_ATTRIBUTE, TYPE_ATTRIBUTE
 
Constructor Summary
BasicFeature()
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
          adds a property change listener to this feature.
 EscotFeature duplicate()
          Features that should be duplicated when wired to return a duplicate to handle the next wire.
 Object getAttribute(String attribute)
          gets the value of the given attribute
 String getName()
          gets the name of this feature
 void putAttribute(String attribute, Object newValue)
          associates the given value with the given attribute
 void removePropertyChangeListener(PropertyChangeListener l)
          removes a property change listener from this feature
 void setName(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INITIAL_ATTR_CAPACITY

protected int INITIAL_ATTR_CAPACITY

mPCSupport

protected transient PropertyChangeSupport mPCSupport

mAttributes

protected Hashtable mAttributes
Constructor Detail

BasicFeature

public BasicFeature()
Method Detail

setName

public void setName(String name)

getName

public String getName()
Description copied from interface: EscotFeature
gets the name of this feature
Specified by:
getName in interface EscotFeature
Following copied from interface: org.escot.EscotFeature
Returns:
the name of the feature

getAttribute

public Object getAttribute(String attribute)
Description copied from interface: EscotFeature
gets the value of the given attribute
Specified by:
getAttribute in interface EscotFeature
Following copied from interface: org.escot.EscotFeature
Parameters:
attribute - the attribute
Returns:
an Object representing the value

putAttribute

public void putAttribute(String attribute,
                         Object newValue)
Description copied from interface: EscotFeature
associates the given value with the given attribute
Specified by:
putAttribute in interface EscotFeature
Following copied from interface: org.escot.EscotFeature
Parameters:
attribute - the attribute
value - the value for the attribute

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)
Description copied from interface: EscotFeature
adds a property change listener to this feature. Notified of changes in Name or attributes.
Specified by:
addPropertyChangeListener in interface EscotFeature
Following copied from interface: org.escot.EscotFeature
Parameters:
l - a PropertyChangeListener that wants to be notified of changes

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)
Description copied from interface: EscotFeature
removes a property change listener from this feature
Specified by:
removePropertyChangeListener in interface EscotFeature
Following copied from interface: org.escot.EscotFeature
Parameters:
l - a PropertyChangeListener that no longer wants to listen to changes

duplicate

public EscotFeature duplicate()
                       throws InstantiationException,
                              IllegalAccessException
Description copied from interface: EscotFeature
Features that should be duplicated when wired to return a duplicate to handle the next wire.
Specified by:
duplicate in interface EscotFeature