public class TimeModelDiscrete extends TimeModelDateBased
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PROP_DisplayUnitIndex |
static java.lang.String |
PROP_StepWidth |
static java.lang.String |
PROP_TimeCurrent |
static java.lang.String |
PROP_TimeFormat |
static java.lang.String |
PROP_TimeStart |
static java.lang.String |
PROP_TimeStop |
DEFAULT_TIME_FORMAT, timeFormat, timeStart, timeStop| Constructor and Description |
|---|
TimeModelDiscrete()
Instantiates a new time model discrete.
|
TimeModelDiscrete(long stepInTime)
Instantiates a new time model discrete.
|
TimeModelDiscrete(long startTime,
long stopTime,
long stepInTime)
Instantiates a new time model discrete.
|
| Modifier and Type | Method and Description |
|---|---|
TimeModel |
getCopy()
Returns a copy of the current TimeModel.
|
TimeModelBaseExecutionElements |
getDisplayElements4Execution()
Returns a DisplayJToolBar4Execution (an extended JToolBar) that consists of the necessary
tools to handle a TimeModel during execution.
|
JPanel4TimeModelConfiguration |
getJPanel4Configuration(Project project)
Returns the DisplayJPanel4Configuration.java (an extended JPanel) for the configuration
of a TimeModel (before the agency is executed).
|
long |
getStep()
Returns the step width as long.
|
int |
getStepDisplayUnitAsIndexOfTimeUnitVector()
Returns the step display unit as index of the TimeUnitVector.
|
long |
getTime() |
java.util.HashMap<java.lang.String,java.lang.String> |
getTimeModelSetting()
Returns the setup configuration of the TimeModel as HashSet
|
void |
setStep(long step)
Sets the step width.
|
void |
setStepDisplayUnitAsIndexOfTimeUnitVector(int stepDisplayUnitAsIndexOfTimeUnitVector)
Sets the step display unit as index of the TimeUnitVector.
|
void |
setTime(long counter)
Sets the current time of the model.
|
void |
setTimeModelSettings(java.util.HashMap<java.lang.String,java.lang.String> timeModelSettings)
Sets the setup configuration as HashSet
|
void |
step()
Steps the time with the given time step.
|
void |
stepBack()
Steps back the time with the given time step.
|
getDateForMidnight, getDateForMidnight, getTimeFormat, getTimeStart, getTimeStop, setTimeFormat, setTimeStart, setTimeStopgetStopWatch, setStopWatchpublic static final java.lang.String PROP_TimeCurrent
public static final java.lang.String PROP_TimeStart
public static final java.lang.String PROP_TimeStop
public static final java.lang.String PROP_StepWidth
public static final java.lang.String PROP_DisplayUnitIndex
public static final java.lang.String PROP_TimeFormat
public TimeModelDiscrete()
public TimeModelDiscrete(long stepInTime)
stepInTime - the step width in timepublic TimeModelDiscrete(long startTime,
long stopTime,
long stepInTime)
stepInTime - the step width in timestartTime - the start timepublic TimeModel getCopy()
TimeModelpublic void setTime(long counter)
counter - the counter to setpublic long getTime()
getTime in class TimeModelDateBasedpublic void step()
public void stepBack()
public long getStep()
public void setStep(long step)
step - the step width as longpublic void setStepDisplayUnitAsIndexOfTimeUnitVector(int stepDisplayUnitAsIndexOfTimeUnitVector)
stepDisplayUnitAsIndexOfTimeUnitVector - the new step display unit as index of the TimeUnitVectorTimeUnitVectorpublic int getStepDisplayUnitAsIndexOfTimeUnitVector()
TimeUnitVectorpublic JPanel4TimeModelConfiguration getJPanel4Configuration(Project project)
TimeModelgetJPanel4Configuration in class TimeModelproject - the current Agent.GUI Projectpublic TimeModelBaseExecutionElements getDisplayElements4Execution()
TimeModelgetDisplayElements4Execution in class TimeModelpublic void setTimeModelSettings(java.util.HashMap<java.lang.String,java.lang.String> timeModelSettings)
TimeModelsetTimeModelSettings in class TimeModeltimeModelSettings - the time model setup configuration as HashSetpublic java.util.HashMap<java.lang.String,java.lang.String> getTimeModelSetting()
TimeModelgetTimeModelSetting in class TimeModel