Class TLcdModelProducerEvent

All Implemented Interfaces:
ILcdDispatchableEvent, Serializable

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

  • Constructor Details

    • TLcdModelProducerEvent

      public TLcdModelProducerEvent(ILcdModelProducer aSource, int aId, ILcdModel aModel)
      Constructs a new event indicating the a model was created.
      Parameters:
      aSource - the object that was responsible for the creation of the model. Cannot be null.
      aId - indicates the production state of the model. Currently only MODEL_PRODUCED is supported.
      aModel - the model that was created. Cannot be null.
    • TLcdModelProducerEvent

      public TLcdModelProducerEvent(ILcdModelProducer aSource, int aId, ILcdModel aModel, boolean isAdjusting)
      Constructs a new event indicating the a model was created.
      Parameters:
      aSource - the object that was responsible for the creation of the model. Cannot be null.
      aId - indicates the production state of the model. Currently only MODEL_PRODUCED is supported.
      aModel - the model that was created. Cannot be null.
      isAdjusting - whether or not other events of this type will be following shortly.
  • 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 type of change this event was caused by. This can be either STATE_CHANGED or MODEL_PRODUCED.
      Returns:
      the type of change.
    • getModelProducer

      public ILcdModelProducer getModelProducer()
      Returns the model producer responsible for the change on a model.
      Returns:
      the model producer responsible for the change on a model.
    • getModel

      public ILcdModel getModel()
      Returns the model on which the changes have taken place.
      Returns:
      the model on which the changes have taken place.
    • isAdjusting

      public boolean isAdjusting()
      Returns whether this event is part of a sequence of events.
      Returns:
      true when this event is part of a sequence of TLcdModelProducerEvent objects.
    • paramString

      protected String paramString()
      Returns the display name of the model (found in the model descriptor) and whether is adjusting is set.
      Overrides:
      paramString in class ALcdDispatchableEvent
      Returns:
      the display name of the model (found in the model descriptor) and whether is adjusting is set.