Class TLcdSimulatorModelList
- All Implemented Interfaces:
ILcdSimulatorModel,ILcdPropertyChangeSource
ILcdSimulatorModel implementation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPropertyChangeListener(PropertyChangeListener aListener) Registers the givenPropertyChangeListenerto be notified when this object's properties change.voidaddSimulatorModel(ILcdSimulatorModel aSimulatorModel) Adds a simulator model to the list of simulator models.Returns the begin Date of the simulation.getDate()Gets the Date corresponding to the current state of the domain objects (tracks) thisILcdSimulatorModelcontains.Returns the end Date of the simulation.getSimulatorModel(int aIndex) Returns the simulator model at the given index in the list.intReturns the number of models in the list.Returns the array ofILcdModels holding the simulated domain data.booleanDeprecated.This method has been deprecated.voidDe-registers the givenPropertyChangeListenerfrom receiving property change events for this object.voidremoveSimulatorModel(ILcdSimulatorModel aSimulatorModel) Removes a simulator model from the list of simulator models.static voidsetClassTraceOn(boolean aClassTraceOn) Deprecated.This method has been deprecated.voidAsks thisILcdSimulatorModelto update the domain objects (tracks) of the simulation it contains, in order to be in the state in which they were or should be at the given Date.voidsetTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated.
-
Constructor Details
-
TLcdSimulatorModelList
public TLcdSimulatorModelList()
-
-
Method Details
-
getTrackModels
Description copied from interface:ILcdSimulatorModelReturns the array of
ILcdModels holding the simulated domain data. The state of the domain objects in these models is updated whensetDateis called.A property change event must be fired whenever the return value of this method changes.
- Specified by:
getTrackModelsin interfaceILcdSimulatorModel- Returns:
- The array of
ILcdModels holding the simulated domain data. This must not benull. - See Also:
-
isTraceOn
public boolean isTraceOn()Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Returnstrueif tracing is enabled for this class.- Returns:
- true if tracing is enabled for this class, false otherwise.
-
setTraceOn
public void setTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for this class instance. Calling this method with eithertrueorfalseas argument automatically turns off tracing for all other class instances for whichsetTraceOnhas not been called. If the argument isfalsethen only the informative, warning and error log messages are recorded.- Parameters:
aTraceOn- if true then all log messages are recorded for this instance. If false, then only the informative, warning and error log messages are recorded.
-
setClassTraceOn
public static void setClassTraceOn(boolean aClassTraceOn) Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for all instances of this class. If the argument istruethen all log messages are recorded, otherwise only the informative, warning and error messages are recorded.- Parameters:
aClassTraceOn- if true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
-
getSimulatorModel
Returns the simulator model at the given index in the list.- Parameters:
aIndex- the index of the simulator model to return.- Returns:
- the simulator model at the given index in the list.
-
getSimulatorModelCount
public int getSimulatorModelCount()Returns the number of models in the list.- Returns:
- the number of models in the list.
-
addSimulatorModel
Adds a simulator model to the list of simulator models. This recalculates the begin and end date.- Parameters:
aSimulatorModel- the simulator model to add to the list.
-
removeSimulatorModel
Removes a simulator model from the list of simulator models. This recalculates the begin and end date.- Parameters:
aSimulatorModel- the simulator model to remove from the list.
-
setDate
Description copied from interface:ILcdSimulatorModelAsks thisILcdSimulatorModelto update the domain objects (tracks) of the simulation it contains, in order to be in the state in which they were or should be at the given Date. This state might include location, feature values, etc.The
TLcdSimulatoralways calls this method on the AWT Event Dispatch ThreadImplementations of this method should respect the threading rules of LuciadLightspeed. Specifically, implementations should take a write lock on the track models they update when creating a multithreaded application.
- Specified by:
setDatein interfaceILcdSimulatorModel- Parameters:
aDate- The Date to update to. This is nevernull.- See Also:
-
getDate
Description copied from interface:ILcdSimulatorModelGets the Date corresponding to the current state of the domain objects (tracks) thisILcdSimulatorModelcontains.- Specified by:
getDatein interfaceILcdSimulatorModel- Returns:
- The Date of the current state.
- See Also:
-
getBeginDate
Description copied from interface:ILcdSimulatorModelReturns the begin Date of the simulation.
A property change event must be fired whenever the return value of this method changes.
- Specified by:
getBeginDatein interfaceILcdSimulatorModel- Returns:
- The begin Date of the simulation. This must not be
null.
-
getEndDate
Description copied from interface:ILcdSimulatorModelReturns the end Date of the simulation.
A property change event must be fired whenever the return value of this method changes.
- Specified by:
getEndDatein interfaceILcdSimulatorModel- Returns:
- The end Date of the simulation. This must not be
null.
-
addPropertyChangeListener
Description copied from interface:ILcdPropertyChangeSourceRegisters the given
PropertyChangeListenerto be notified when this object's properties change.In case you need to register a listener which keeps a reference to an object with a shorter life-time than this change source, you can use a
ALcdWeakPropertyChangeListenerinstance as property change listener.- Specified by:
addPropertyChangeListenerin interfaceILcdPropertyChangeSource- Parameters:
aListener- The listener to be notified- See Also:
-
removePropertyChangeListener
Description copied from interface:ILcdPropertyChangeSourceDe-registers the given
PropertyChangeListenerfrom receiving property change events for this object.If the listener was added more than once, it will be notified one less time after being removed. If the listener is
null, or was never added, no exception is thrown and no action is taken.- Specified by:
removePropertyChangeListenerin interfaceILcdPropertyChangeSource- Parameters:
aListener- the listener that should no longer be notified of changes of this object's properties- See Also:
-