public class TLcdModelChangedEventSupport extends Object
TLcdModelChangedEvent
objects as required. It can collect and simplify multiple changes before sending out events.Constructor and Description |
---|
TLcdModelChangedEventSupport(ILcdModel aModel)
Constructs a new
TLcdModelChangedEventSupport for the given model. |
Modifier and Type | Method and Description |
---|---|
void |
addModelListener(ILcdModelListener aModelListener)
Adds an
ILcdModelListener 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 an
Object 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 an
Object 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 |
fireCollectedModelChanges()
Fires a
TLcdModelChangedEvent that contains all the collected selection changes. |
void |
removeModelListener(ILcdModelListener aModelListener)
Removes an
ILcdModelListener from this model. |
public TLcdModelChangedEventSupport(ILcdModel aModel)
TLcdModelChangedEventSupport
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.
aModel
- the model for which the TLcdModelChangedEvent
objects will be handled.public void fireCollectedModelChanges()
TLcdModelChangedEvent
that contains all the collected selection changes.public void elementAdded(Object aObject, int aEventMode)
Object
to the model.aObject
- the Object
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.ILcdFireEventMode
public void elementsAdded(Vector aObjects, int aEventMode)
aObjects
- the Vector
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.ILcdFireEventMode
public void elementRemoved(Object aObject, int aEventMode)
Object
from the model.aObject
- the Object
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.ILcdFireEventMode
public void elementsRemoved(Vector aObjects, int aEventMode)
aObjects
- the Vector
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.ILcdFireEventMode
public void allElementsRemoved(int aEventMode)
aEventMode
- the mode for sending out the model event. This can be
ILcdFireEventMode.FIRE_NOW, ILcdFireEventMode.LATER or ILcdFireEventMode.NO_EVENT.ILcdFireEventMode
public void elementChanged(Object aObject, int aEventMode)
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.ILcdFireEventMode
public void elementsChanged(Vector aObjects, int aEventMode)
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.ILcdFireEventMode
public void allElementsChanged(int aEventMode)
aEventMode
- the mode for sending out the model event. This can be
ILcdFireEventMode.FIRE_NOW, ILcdFireEventMode.LATER or ILcdFireEventMode.NO_EVENT.ILcdFireEventMode
public void addModelListener(ILcdModelListener aModelListener)
ILcdModelListener
to this model.aModelListener
- the modelListener to remove.removeModelListener(com.luciad.model.ILcdModelListener)
public void removeModelListener(ILcdModelListener aModelListener)
ILcdModelListener
from this model.aModelListener
- the modelListener to remove.addModelListener(com.luciad.model.ILcdModelListener)