com.threerings.presents.dobj
Class NamedAttributeListener

java.lang.Object
  extended by com.threerings.presents.dobj.NamedAttributeListener
All Implemented Interfaces:
AttributeChangeListener, ChangeListener

public abstract class NamedAttributeListener
extends Object
implements AttributeChangeListener

A AttributeChangeListener that listens for changes with a given name and calls namedAttributeChanged when they occur.


Field Summary
protected  String _name
           
 
Constructor Summary
NamedAttributeListener(String name)
          Listen for AttributeChangedEvent events with the given name.
 
Method Summary
 void attributeChanged(AttributeChangedEvent event)
          Called when an attribute changed event has been dispatched on an object.
abstract  void namedAttributeChanged(AttributeChangedEvent event)
          The attribute this listener is watching has changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_name

protected final String _name
Constructor Detail

NamedAttributeListener

public NamedAttributeListener(String name)
Listen for AttributeChangedEvent events with the given name.

Method Detail

attributeChanged

public final void attributeChanged(AttributeChangedEvent event)
Description copied from interface: AttributeChangeListener
Called when an attribute changed event has been dispatched on an object. This will be called after the event has been applied to the object. So fetching the attribute during this call will provide the new value for the attribute.

Specified by:
attributeChanged in interface AttributeChangeListener
Parameters:
event - The event that was dispatched on the object.

namedAttributeChanged

public abstract void namedAttributeChanged(AttributeChangedEvent event)
The attribute this listener is watching has changed.