public abstract class ALcdSimulatorModel extends Object implements ILcdSimulatorModel
updateTrackModels
to let the simulator data match the current date.Modifier | Constructor and Description |
---|---|
protected |
ALcdSimulatorModel()
Creates a new
ALcdSimulatorModel . |
protected |
ALcdSimulatorModel(ILcdModel[] aTrackModels,
Date aBeginDate,
Date aEndDate)
Creates a new
ALcdSimulatorModel with the given track models,
begin date and end date. |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener aListener)
Adds the given listener to the list of listeners, so that it will receive property change
events.
|
protected void |
firePropertyChangeEvent(PropertyChangeEvent aEvent)
Fires the given
PropertyChangeEvent to all associated listeners. |
Date |
getBeginDate()
Returns the begin Date of the simulation.
|
Date |
getDate()
Gets the Date corresponding to the current state of the domain objects (tracks) this
ILcdSimulatorModel contains. |
Date |
getEndDate()
Returns the end Date of the simulation.
|
ILcdModel[] |
getTrackModels()
Returns the array of
ILcdModel s holding the simulated domain data. |
void |
removePropertyChangeListener(PropertyChangeListener aListener)
Removes the given listener so that it no longer receives property change events.
|
protected void |
setBeginDate(Date aBeginDate)
Sets the begin date.
|
void |
setDate(Date aDate)
Sets a new date.
|
protected void |
setEndDate(Date aEndDate)
Sets the end date.
|
protected void |
setTrackModels(ILcdModel[] aTrackModels)
Sets the track models property.
|
protected abstract void |
updateTrackModels(Date aOldDate,
Date aNewDate)
Updates the track models of this
ALcdSimulatorModel to the given new
Date . |
protected ALcdSimulatorModel()
ALcdSimulatorModel
. One must call setTrackModels
,
setBeginDate
and setEndDate
to have a useful instance.protected ALcdSimulatorModel(ILcdModel[] aTrackModels, Date aBeginDate, Date aEndDate)
ALcdSimulatorModel
with the given track models,
begin date and end date.aTrackModels
- The track models.aBeginDate
- The begin date.aEndDate
- The end date.setTrackModels(com.luciad.model.ILcdModel[])
,
setBeginDate(java.util.Date)
,
setEndDate(java.util.Date)
public void addPropertyChangeListener(PropertyChangeListener aListener)
addPropertyChangeListener
in interface ILcdPropertyChangeSource
aListener
- The listener to add.ALcdWeakPropertyChangeListener
,
ILcdPropertyChangeSource.removePropertyChangeListener(java.beans.PropertyChangeListener)
public void removePropertyChangeListener(PropertyChangeListener aListener)
removePropertyChangeListener
in interface ILcdPropertyChangeSource
aListener
- The listener to remove.ILcdPropertyChangeSource.addPropertyChangeListener(java.beans.PropertyChangeListener)
protected void firePropertyChangeEvent(PropertyChangeEvent aEvent)
PropertyChangeEvent
to all associated listeners.aEvent
- The event to fire.public ILcdModel[] getTrackModels()
ILcdSimulatorModel
Returns the array of ILcdModel
s holding the simulated domain data. The state of
the domain objects in these models is updated when setDate
is called.
A property change event must be fired whenever the return value of this method changes.
getTrackModels
in interface ILcdSimulatorModel
ILcdModel
s holding the simulated domain data. This must not be
null
.ILcdSimulatorModel.setDate(java.util.Date)
protected void setTrackModels(ILcdModel[] aTrackModels)
aTrackModels
- The new array of track models.getTrackModels()
public Date getBeginDate()
ILcdSimulatorModel
Returns the begin Date of the simulation.
A property change event must be fired whenever the return value of this method changes.
getBeginDate
in interface ILcdSimulatorModel
null
.protected void setBeginDate(Date aBeginDate)
aBeginDate
- The new begin date.getBeginDate()
public Date getEndDate()
ILcdSimulatorModel
Returns the end Date of the simulation.
A property change event must be fired whenever the return value of this method changes.
getEndDate
in interface ILcdSimulatorModel
null
.protected void setEndDate(Date aEndDate)
aEndDate
- The new end date.getEndDate()
public Date getDate()
ILcdSimulatorModel
ILcdSimulatorModel
contains.getDate
in interface ILcdSimulatorModel
ILcdSimulatorModel.setDate(Date)
public void setDate(Date aDate)
updateTrackModels(java.util.Date, java.util.Date)
to update the simulator data represented by this ALcdSimulatorModel
.
Note that no property change event is fired.setDate
in interface ILcdSimulatorModel
aDate
- The new date.ILcdSimulatorModel.getTrackModels()
,
ILcdSimulatorModel.getDate()
,
TLcdLockUtil.writeLock(Object)
protected abstract void updateTrackModels(Date aOldDate, Date aNewDate)
ALcdSimulatorModel
to the given new
Date
. This method is called by setDate
.aOldDate
- The old date, given as contextual information.aNewDate
- The date to update the track models of this
ALcdSimulatorModel
to.