Package com.luciad.model
Class TLcdModelChangedEventSupport
java.lang.Object
com.luciad.model.TLcdModelChangedEventSupport
Implements support for firing model change events. It constructs and sends out
TLcdModelChangedEvent
objects as required. It can collect and simplify multiple changes before sending out events.-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newTLcdModelChangedEventSupportfor the given model. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddModelListener(ILcdModelListener aModelListener) Adds anILcdModelListenerto this model.voidallElementsChanged(int aEventMode) Takes care of firing the model event after having changed all Objects int the model.voidallElementsRemoved(int aEventMode) Takes care of firing the model event after having removed all Objects from the model.voidelementAdded(Object aObject, int aEventMode) Takes care of firing the model event after having added anObjectto the model.voidelementChanged(Object aObject, int aEventMode) Takes care of firing the model event after one of the Objects in the model has changed.voidelementRemoved(Object aObject, int aEventMode) Takes care of firing the model event after having removed anObjectfrom the model.voidelementsAdded(Vector aObjects, int aEventMode) Takes care of firing the model event after having added several Objects to the model.voidelementsChanged(Vector aObjects, int aEventMode) Takes care of firing the model event after several of Objects in the model have changed.voidelementsRemoved(Vector aObjects, int aEventMode) Takes care of firing the model event after having removed several Objects from the model.voidFires aTLcdModelChangedEventthat contains all the collected selection changes.voidremoveModelListener(ILcdModelListener aModelListener) Removes anILcdModelListenerfrom this model.
-
Constructor Details
-
TLcdModelChangedEventSupport
Constructs a newTLcdModelChangedEventSupportfor the given model.The model listeners of the specified model cannot be accessed directly by this object; only listeners that are explicitly registered on this object by means of the
addModelListener(ILcdModelListener)method are notified of model changes.- Parameters:
aModel- the model for which theTLcdModelChangedEventobjects will be handled.
-
-
Method Details
-
fireCollectedModelChanges
public void fireCollectedModelChanges()Fires aTLcdModelChangedEventthat contains all the collected selection changes. -
elementAdded
Takes care of firing the model event after having added anObjectto the model.- Parameters:
aObject- theObjectthat has been added to the model.aEventMode- the mode for sending out the model event. This can be ILcdFireEventMode.FIRE_NOW, ILcdFireEventMode.LATER or ILcdFireEventMode.NO_EVENT.- See Also:
-
elementsAdded
Takes care of firing the model event after having added several Objects to the model.- Parameters:
aObjects- theVectorof Objects that has been added to the model.aEventMode- the mode for sending out the model event. This can be ILcdFireEventMode.FIRE_NOW, ILcdFireEventMode.LATER or ILcdFireEventMode.NO_EVENT.- See Also:
-
elementRemoved
Takes care of firing the model event after having removed anObjectfrom the model.- Parameters:
aObject- theObjectthat has been removed from the model.aEventMode- the mode for sending out the model event. This can be ILcdFireEventMode.FIRE_NOW, ILcdFireEventMode.LATER or ILcdFireEventMode.NO_EVENT.- See Also:
-
elementsRemoved
Takes care of firing the model event after having removed several Objects from the model.- Parameters:
aObjects- theVectorof Objects that has been removed from the model.aEventMode- the mode for sending out the model event. This can be ILcdFireEventMode.FIRE_NOW, ILcdFireEventMode.LATER or ILcdFireEventMode.NO_EVENT.- See Also:
-
allElementsRemoved
public void allElementsRemoved(int aEventMode) Takes care of firing the model event after having removed all Objects from the model. This call resets the mode to TLcdModelChangedEvent.ALL_OBJECTS_REMOVED and removes all model changes from the list of changes of the event that will be fired.- Parameters:
aEventMode- the mode for sending out the model event. This can be ILcdFireEventMode.FIRE_NOW, ILcdFireEventMode.LATER or ILcdFireEventMode.NO_EVENT.- See Also:
-
elementChanged
Takes care of firing the model event after one of the Objects in the model has changed.- Parameters:
aObject- object that has changed.aEventMode- the mode for sending out the model event. This can be ILcdFireEventMode.FIRE_NOW, ILcdFireEventMode.LATER or ILcdFireEventMode.NO_EVENT.- See Also:
-
elementsChanged
Takes care of firing the model event after several of Objects in the model have changed.- Parameters:
aObjects- objects that have changed.aEventMode- the mode for sending out the model event. This can be ILcdFireEventMode.FIRE_NOW, ILcdFireEventMode.LATER or ILcdFireEventMode.NO_EVENT.- See Also:
-
allElementsChanged
public void allElementsChanged(int aEventMode) Takes care of firing the model event after having changed all Objects int the model. This call adds TLcdModelChangedEvent.ALL_OBJECTS_CHANGED and TLcdModelChangedEvent.OBJECTS_CHANGED to the mode and does not alter the list of changes of the event that will be fired.- Parameters:
aEventMode- the mode for sending out the model event. This can be ILcdFireEventMode.FIRE_NOW, ILcdFireEventMode.LATER or ILcdFireEventMode.NO_EVENT.- See Also:
-
addModelListener
Adds anILcdModelListenerto this model.- Parameters:
aModelListener- the modelListener to remove.- See Also:
-
removeModelListener
Removes anILcdModelListenerfrom this model.- Parameters:
aModelListener- the modelListener to remove.- See Also:
-