com.threerings.presents.dobj
Class SetAdapter<T extends DSet.Entry>

java.lang.Object
  extended by com.threerings.presents.dobj.SetAdapter<T>
Type Parameters:
T - the type of entry being handled by this listener. This must match the type on the set that generates the events.
All Implemented Interfaces:
ChangeListener, SetListener<T>
Direct Known Subclasses:
NamedSetAdapter

public class SetAdapter<T extends DSet.Entry>
extends Object
implements SetListener<T>

Implements the methods in SetListener so that you don't have to implement the ones you don't want to.

NOTE: This adapter will receive all Entry events from a DObject it's listening to, so it should check that the event's name matches the field it's interested in before acting on the event.


Constructor Summary
SetAdapter()
           
 
Method Summary
 void entryAdded(EntryAddedEvent<T> event)
          Called when an entry added event has been dispatched on an object.
 void entryRemoved(EntryRemovedEvent<T> event)
          Called when an entry removed event has been dispatched on an object.
 void entryUpdated(EntryUpdatedEvent<T> event)
          Called when an entry updated event has been dispatched on an object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetAdapter

public SetAdapter()
Method Detail

entryAdded

public void entryAdded(EntryAddedEvent<T> event)
Description copied from interface: SetListener
Called when an entry added event has been dispatched on an object. This will be called after the event has been applied to the object.

Specified by:
entryAdded in interface SetListener<T extends DSet.Entry>
Parameters:
event - The event that was dispatched on the object.

entryUpdated

public void entryUpdated(EntryUpdatedEvent<T> event)
Description copied from interface: SetListener
Called when an entry updated event has been dispatched on an object. This will be called after the event has been applied to the object.

Specified by:
entryUpdated in interface SetListener<T extends DSet.Entry>
Parameters:
event - The event that was dispatched on the object.

entryRemoved

public void entryRemoved(EntryRemovedEvent<T> event)
Description copied from interface: SetListener
Called when an entry removed event has been dispatched on an object. This will be called after the event has been applied to the object.

Specified by:
entryRemoved in interface SetListener<T extends DSet.Entry>
Parameters:
event - The event that was dispatched on the object.