com.threerings.presents.dobj
Class NamedElementUpdateListener

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

public abstract class NamedElementUpdateListener
extends Object
implements ElementUpdateListener

An ElementUpdateListener that listens for changes with a given name and calls namedElementUpdated when they occur.


Field Summary
protected  String _name
           
 
Constructor Summary
NamedElementUpdateListener(String name)
          Listen for element updates with the given name.
 
Method Summary
 void elementUpdated(ElementUpdatedEvent event)
          Called when an element updated event has been dispatched on an object.
protected abstract  void namedElementUpdated(ElementUpdatedEvent event)
           
 
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

NamedElementUpdateListener

public NamedElementUpdateListener(String name)
Listen for element updates with the given name.

Method Detail

elementUpdated

public final void elementUpdated(ElementUpdatedEvent event)
Description copied from interface: ElementUpdateListener
Called when an element updated event has been dispatched on an object. This will be called after the event has been applied to the object. So fetching the element during this call will provide the new value for the element.

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

namedElementUpdated

protected abstract void namedElementUpdated(ElementUpdatedEvent event)