Class TLcdTimeFilteredSimulatorModel
- All Implemented Interfaces:
ILcdSimulatorModel,ILcdPropertyChangeSource
Decorator for an ILcdSimulatorModel which allows to limit the exposed available time
interval of the ILcdSimulatorModel.
Graphically, it can be seen as (where I stands for the inner ILcdSimulatorModel and
O for the outer):
| | | | |
| -----------|---------------|----------------|--------------------|
| | | | |
I#getBeginDate I#getDate I#getEndDate
O#getBeginDate O#getDate O#getEndDate
The setFilterBeginDate and
setFilterEndDate methods allow to specify where
the begin date and end date of this
ILcdSimulatorModel are located. They must be in the valid interval of the inner
simulator model, or they will be adjusted when invalid.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidRegisters the givenPropertyChangeListenerto be notified when this object's properties change.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.Returns theILcdSimulatorModelcurrently being filtered.Returns the array ofILcdModels holding the simulated domain data.voidDe-registers the givenPropertyChangeListenerfrom receiving property change events for this object.voidsetBeginDate(Date aBeginDate) Sets the begin date to consider.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.voidsetEndDate(Date aEndDate) Sets the end date to consider.voidsetSimulatorModelToFilterOnTime(ILcdSimulatorModel aSimulatorModelToFilterOnTime) Sets theILcdSimulatorModelto filter.
-
Constructor Details
-
TLcdTimeFilteredSimulatorModel
public TLcdTimeFilteredSimulatorModel()
-
-
Method Details
-
setSimulatorModelToFilterOnTime
Sets theILcdSimulatorModelto filter.- Parameters:
aSimulatorModelToFilterOnTime- TheILcdSimulatorModelto filter.- See Also:
-
getSimulatorModelToFilterOnTime
Returns theILcdSimulatorModelcurrently being filtered.- Returns:
- The
ILcdSimulatorModelcurrently being filtered. - See Also:
-
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:
-
setBeginDate
Sets the begin date to consider. The begin date shall be after the begin date of the wrappedILcdSimulatorModel.- Parameters:
aBeginDate- The begin date to set.- See Also:
-
setEndDate
Sets the end date to consider. The end date shall be before the end date of the wrappedILcdSimulatorModel.- Parameters:
aEndDate- The end date to set.- See Also:
-
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:
l- 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:
l- the listener that should no longer be notified of changes of this object's properties- See Also:
-