public class TLcdModelProducerEvent extends ALcdDispatchableEvent
TLcdModelProducerEvent
implements dispatchable events
on a ILcdModelProducer
.Modifier and Type | Field and Description |
---|---|
static int |
MODEL_PRODUCED |
static int |
STATE_CHANGED |
source
Constructor and Description |
---|
TLcdModelProducerEvent(ILcdModelProducer aSource,
int aId,
ILcdModel aModel)
Constructs a new event indicating the a model was created.
|
TLcdModelProducerEvent(ILcdModelProducer aSource,
int aId,
ILcdModel aModel,
boolean isAdjusting)
Constructs a new event indicating the a model was created.
|
Modifier and Type | Method and Description |
---|---|
void |
dispatch(EventListener listener)
Sends this
ILcdDispatchableEvent to the given listener. |
int |
getID()
Returns the type of change this event was caused by.
|
ILcdModel |
getModel()
Returns the model on which the changes have taken place.
|
ILcdModelProducer |
getModelProducer()
Returns the model producer responsible for the change on a model.
|
boolean |
isAdjusting()
Returns whether this event is part of a sequence of events.
|
protected String |
paramString()
Returns the display name of the model (found in the model descriptor) and whether is adjusting is set.
|
toString
getSource
public static final int STATE_CHANGED
public static final int MODEL_PRODUCED
public TLcdModelProducerEvent(ILcdModelProducer aSource, int aId, ILcdModel aModel)
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.public TLcdModelProducerEvent(ILcdModelProducer aSource, int aId, ILcdModel aModel, boolean isAdjusting)
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.public void dispatch(EventListener listener)
ILcdDispatchableEvent
ILcdDispatchableEvent
to the given listener.dispatch
in interface ILcdDispatchableEvent
dispatch
in class ALcdDispatchableEvent
listener
- the listener that will receive this ILcdDispatchableEvent
.public int getID()
STATE_CHANGED
or MODEL_PRODUCED
.public ILcdModelProducer getModelProducer()
public ILcdModel getModel()
public boolean isAdjusting()
TLcdModelProducerEvent
objects.protected String paramString()
paramString
in class ALcdDispatchableEvent