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
ConstructorDescriptionConstructs a newTLcdModelChangedEventSupport
for the given model. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addModelListener
(ILcdModelListener aModelListener) Adds anILcdModelListener
to this model.void
allElementsChanged
(int aEventMode) Takes care of firing the model event after having changed all Objects int the model.void
allElementsRemoved
(int aEventMode) Takes care of firing the model event after having removed all Objects from the model.void
elementAdded
(Object aObject, int aEventMode) Takes care of firing the model event after having added anObject
to the model.void
elementChanged
(Object aObject, int aEventMode) Takes care of firing the model event after one of the Objects in the model has changed.void
elementRemoved
(Object aObject, int aEventMode) Takes care of firing the model event after having removed anObject
from the model.void
elementsAdded
(Vector aObjects, int aEventMode) Takes care of firing the model event after having added several Objects to the model.void
elementsChanged
(Vector aObjects, int aEventMode) Takes care of firing the model event after several of Objects in the model have changed.void
elementsRemoved
(Vector aObjects, int aEventMode) Takes care of firing the model event after having removed several Objects from the model.void
Fires aTLcdModelChangedEvent
that contains all the collected selection changes.void
removeModelListener
(ILcdModelListener aModelListener) Removes anILcdModelListener
from this model.
-
Constructor Details
-
TLcdModelChangedEventSupport
Constructs a newTLcdModelChangedEventSupport
for 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 theTLcdModelChangedEvent
objects will be handled.
-
-
Method Details
-
fireCollectedModelChanges
public void fireCollectedModelChanges()Fires aTLcdModelChangedEvent
that contains all the collected selection changes. -
elementAdded
Takes care of firing the model event after having added anObject
to the model.- Parameters:
aObject
- theObject
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:
-
elementsAdded
Takes care of firing the model event after having added several Objects to the model.- Parameters:
aObjects
- theVector
of 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 anObject
from the model.- Parameters:
aObject
- theObject
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:
-
elementsRemoved
Takes care of firing the model event after having removed several Objects from the model.- Parameters:
aObjects
- theVector
of 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 anILcdModelListener
to this model.- Parameters:
aModelListener
- the modelListener to remove.- See Also:
-
removeModelListener
Removes anILcdModelListener
from this model.- Parameters:
aModelListener
- the modelListener to remove.- See Also:
-