Package net.ontopia.topicmaps.impl.utils
Class ObjectTreeManager
- java.lang.Object
-
- net.ontopia.topicmaps.impl.utils.ObjectTreeManager
-
- All Implemented Interfaces:
Serializable,EventListenerIF,EventManagerIF
public class ObjectTreeManager extends Object implements EventManagerIF, Serializable
INTERNAL: Event manager that fires object added and removed events for children of added or removed objects. This class is itself an event listener that listens to the standard property change events fired by the object model. Objects that are added or removed are traversed and further events for the children of those objects are fired. If your event listeners depends on knowing when objects are added or removed use this class instead of doing the traversal yourself.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classObjectTreeManager.EventHandler
-
Field Summary
Fields Modifier and Type Field Description protected CollectionFactoryIFcfactoryprotected Map<String,ObjectTreeManager.EventHandler>handlersprotected Map<String,Set<EventListenerIF>>listenersprotected ObjectTreeManagerotree
-
Constructor Summary
Constructors Constructor Description ObjectTreeManager(EventManagerIF emanager, CollectionFactoryIF cfactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(EventListenerIF listener, String event)INTERNAL: Register the listener as a listener for the event.voidprocessEvent(Object object, String event, Object new_value, Object old_value)INTERNAL: A method that receives notification when an event has been triggered.voidremoveListener(EventListenerIF listener, String event)INTERNAL: Unregister the listener as a listener for the event.
-
-
-
Field Detail
-
handlers
protected Map<String,ObjectTreeManager.EventHandler> handlers
-
listeners
protected Map<String,Set<EventListenerIF>> listeners
-
otree
protected ObjectTreeManager otree
-
cfactory
protected CollectionFactoryIF cfactory
-
-
Constructor Detail
-
ObjectTreeManager
public ObjectTreeManager(EventManagerIF emanager, CollectionFactoryIF cfactory)
-
-
Method Detail
-
addListener
public void addListener(EventListenerIF listener, String event)
Description copied from interface:EventManagerIFINTERNAL: Register the listener as a listener for the event.- Specified by:
addListenerin interfaceEventManagerIF
-
removeListener
public void removeListener(EventListenerIF listener, String event)
Description copied from interface:EventManagerIFINTERNAL: Unregister the listener as a listener for the event.- Specified by:
removeListenerin interfaceEventManagerIF
-
processEvent
public void processEvent(Object object, String event, Object new_value, Object old_value)
Description copied from interface:EventListenerIFINTERNAL: A method that receives notification when an event has been triggered.- Specified by:
processEventin interfaceEventListenerIF
-
-