Class TLcdModelContainerEvent

All Implemented Interfaces:
ILcdDispatchableEvent, Serializable

public class TLcdModelContainerEvent extends ALcdDispatchableEvent
TLcdModelContainerEvent implements dispatchable events on a ILcdModelContainer.
See Also:
  • Field Details

    • CONTENT_CHANGED

      public static final int CONTENT_CHANGED
      Part of the event ID when the ModelContainer contents changed.
      See Also:
    • MODEL_ADDED

      public static final int MODEL_ADDED
      Part of the event ID when an object has been added to the container. Incorporates CONTENT_CHANGED.
      See Also:
    • MODEL_REMOVED

      public static final int MODEL_REMOVED
      Part of the event ID when an object has been deleted from the container. Incorporates CONTENT_CHANGED.
      See Also:
  • Constructor Details

    • TLcdModelContainerEvent

      public TLcdModelContainerEvent(ILcdModelContainer aModelContainer, int aID, ILcdModel aModel)
      An event that indicates that aModelContainer has changed in aID manner, which involves aModel.
      Parameters:
      aModelContainer - the model container that has changed.
      aID - description of the change to the model container. Compare to CONTENT_CHANGED, MODEL_ADDED, MODEL_REMOVED.
      aModel - the model which caused the change to the model container.
  • Method Details

    • dispatch

      public void dispatch(EventListener listener)
      Description copied from interface: ILcdDispatchableEvent
      Sends this ILcdDispatchableEvent to the given listener.
      Specified by:
      dispatch in interface ILcdDispatchableEvent
      Specified by:
      dispatch in class ALcdDispatchableEvent
      Parameters:
      listener - the listener that will receive this ILcdDispatchableEvent.
    • getID

      public int getID()
      Returns the ID indicating the type of event. Compare to CONTENT_CHANGED, MODEL_ADDED, MODEL_REMOVED.
      Returns:
      the ID indicating the type of event.
    • getModel

      public ILcdModel getModel()
      Returns the model that caused the change to the model container.
      Returns:
      the model that caused the change to the model container.
    • getModelContainer

      public ILcdModelContainer getModelContainer()
      Returns the model container that has changed.
      Returns:
      the model container that has changed.
    • toString

      public String toString()
      Overrides:
      toString in class ALcdDispatchableEvent