public class SimulationControl extends Object implements PropertyChangeListener
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
autoSaveState
Control save mecanism each time a property is changed (default to false).
|
protected String |
id |
protected boolean |
inUpdateFromProperties |
protected PropertyChangeSupport |
listeners |
protected long |
progress |
protected long |
progressMax |
protected boolean |
running |
protected SimulationStorage |
simulation |
protected boolean |
started |
protected TimeStep |
step |
protected boolean |
stop |
protected String |
text |
| Constructor and Description |
|---|
SimulationControl(String id)
Init simulation control with simulation id.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener l) |
void |
addPropertyChangeListener(String propName,
PropertyChangeListener l) |
String |
getId()
Method getId donne id de la simulation.
|
long |
getProgress()
Get current progress.
|
long |
getProgressMax() |
Properties |
getProperties()
Met dans un Properties tous les champs
|
SimulationStorage |
getSimulation()
Retourne la simulation associe a ce control
|
TimeStep |
getStep()
Method getDate donne la date utiliser par la simulation.
|
String |
getText() |
boolean |
isAutoSaveState()
Get current auto save state.
|
boolean |
isRunning()
Method running.
|
boolean |
isStarted() |
boolean |
isStopSimulationRequest()
Is stop request been asked.
|
void |
propertyChange(PropertyChangeEvent e) |
void |
removePropertyChangeListener(PropertyChangeListener l) |
void |
removePropertyChangeListener(String propName,
PropertyChangeListener l) |
void |
reset()
Reset control values for job restart.
|
void |
setAutoSaveState(boolean autoSaveState)
Change auto save state on property change.
|
void |
setProgress(long progress)
Set current progress.
|
void |
setProgressMax(long progressMax)
Set max progress.
|
void |
setStarted(boolean started)
Appelee juste avant de reellement demarrer le thread de simulation
indique que cette simulation est en cours et qu'il ne faut plus la lancer
|
void |
setStep(TimeStep t)
Modifie la date de la simulation.
|
void |
setStopSimulationRequest(boolean val)
Demande l'arret de la simulation.
|
void |
setText(String text) |
void |
startSimulation()
Appele lors du debut de la simulation.
|
void |
stopSimulation()
Appele lors de la fin reelle de la simulation.
|
void |
updateFromProperties(Properties props)
update current object from Properties representation
|
protected PropertyChangeSupport listeners
protected boolean inUpdateFromProperties
protected transient SimulationStorage simulation
protected String id
protected boolean started
protected boolean running
protected boolean stop
protected TimeStep step
protected long progressMax
protected long progress
protected String text
protected transient boolean autoSaveState
public SimulationControl(String id)
id - simulation idpublic void setAutoSaveState(boolean autoSaveState)
autoSaveState - new statepublic boolean isAutoSaveState()
public void reset()
public SimulationStorage getSimulation()
public void addPropertyChangeListener(String propName, PropertyChangeListener l)
public void addPropertyChangeListener(PropertyChangeListener l)
public void removePropertyChangeListener(String propName, PropertyChangeListener l)
public void removePropertyChangeListener(PropertyChangeListener l)
public boolean isStarted()
public void setStarted(boolean started)
started - The running to set.public boolean isRunning()
public void startSimulation()
public void stopSimulation()
public String getText()
public void setText(String text)
text - The text to set.public long getProgressMax()
public void setProgressMax(long progressMax)
progressMax - progressMax to set.public long getProgress()
public void setProgress(long progress)
progress - progress to set.public void setStopSimulationRequest(boolean val)
val - true to stoppublic boolean isStopSimulationRequest()
public String getId()
public TimeStep getStep()
public void setStep(TimeStep t)
t - la nouvelle etapepublic Properties getProperties()
public void updateFromProperties(Properties props)
props - new properties to update frompublic void propertyChange(PropertyChangeEvent e)
propertyChange in interface PropertyChangeListenerCopyright © 1999–2013 CodeLutin. All rights reserved.