Class TLcdModelChangedEventSupport

java.lang.Object
com.luciad.model.TLcdModelChangedEventSupport

public class TLcdModelChangedEventSupport extends Object
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

    Constructors
    Constructor
    Description
    Constructs a new TLcdModelChangedEventSupport for the given model.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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
    Fires a TLcdModelChangedEvent that contains all the collected selection changes.
    void
    Removes an ILcdModelListener from this model.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TLcdModelChangedEventSupport

      public TLcdModelChangedEventSupport(ILcdModel aModel)
      Constructs a new 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.

      Parameters:
      aModel - the model for which the TLcdModelChangedEvent objects will be handled.
  • Method Details

    • fireCollectedModelChanges

      public void fireCollectedModelChanges()
      Fires a TLcdModelChangedEvent that contains all the collected selection changes.
    • elementAdded

      public void elementAdded(Object aObject, int aEventMode)
      Takes care of firing the model event after having added an Object to the model.
      Parameters:
      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.
      See Also:
    • elementsAdded

      public void elementsAdded(Vector aObjects, int aEventMode)
      Takes care of firing the model event after having added several Objects to the model.
      Parameters:
      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.
      See Also:
    • elementRemoved

      public void elementRemoved(Object aObject, int aEventMode)
      Takes care of firing the model event after having removed an Object from the model.
      Parameters:
      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.
      See Also:
    • elementsRemoved

      public void elementsRemoved(Vector aObjects, int aEventMode)
      Takes care of firing the model event after having removed several Objects from the model.
      Parameters:
      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.
      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

      public void elementChanged(Object aObject, int aEventMode)
      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

      public void elementsChanged(Vector aObjects, int aEventMode)
      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

      public void addModelListener(ILcdModelListener aModelListener)
      Adds an ILcdModelListener to this model.
      Parameters:
      aModelListener - the modelListener to remove.
      See Also:
    • removeModelListener

      public void removeModelListener(ILcdModelListener aModelListener)
      Removes an ILcdModelListener from this model.
      Parameters:
      aModelListener - the modelListener to remove.
      See Also: