|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.time.TimerRateHolder
public class TimerRateHolder
A convenience class that keeps track of a relationship between real-time changes and scenario-time changes.
Field Summary | |
---|---|
protected long |
clockInterval
The number of milliseconds that the timer should wait between updates. |
static java.lang.String |
ClockIntervalProperty
Clock that describes how often the pace value is applied to the time value (clockIntervalMillis). |
static java.lang.String |
DEFAULT_PACE_BASELINE_VALUE
The string used for the default pace baseline ("00:00:00"). |
static java.lang.String |
DEFAULT_PACE_FORMAT
The string used for the default pace format ("HH:mm:ss"). |
protected java.lang.String |
label
Display label for this Timer rate. |
protected long |
pace
The pace is the amount of time that should pass, in simulation time, when the timer gets updated. |
static java.lang.String |
PaceBaselineProperty
PaceBaselineProperty represents the property used for baselining the pace value (paceBaseline). |
protected java.text.SimpleDateFormat |
paceFormat
The format used in the properties to note the pace. |
static java.lang.String |
PaceFormatProperty
PaceFormatProperty represents the property used for describing the pace format (paceFormat). |
static java.lang.String |
PaceProperty
The property used for the pace setting (pace). |
protected java.lang.String |
paceZero
The baseline used to normalize the pace setting. |
protected java.lang.String |
propPrefix
The prefix used to set the properties, saved in case the properties are retrieved. |
static java.lang.String |
TimerRatesProperty
Property used to describe a list of properties for TimerRateHolders (timerRates) |
protected boolean |
valid
Flag that denotes whether the TimerRateHolder has be successfully set. |
Fields inherited from interface com.bbn.openmap.PropertyConsumer |
---|
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty |
Constructor Summary | |
---|---|
TimerRateHolder()
Create a TimerRateHolder with the default pace format and value (00:00:00). |
|
TimerRateHolder(java.text.SimpleDateFormat simpleDateFormat,
java.lang.String dpz)
Create a TimerRateHolder with a date format, and a baseline time. |
Method Summary | |
---|---|
long |
getClockInterval()
|
java.lang.String |
getLabel()
|
long |
getPace()
|
java.util.Properties |
getProperties(java.util.Properties props)
Method to fill in a Properties object, reflecting the current values of the PropertyConsumer. |
java.util.Properties |
getPropertyInfo(java.util.Properties props)
Method to fill in a Properties object with values reflecting the properties able to be set on this PropertyConsumer. |
java.lang.String |
getPropertyPrefix()
Get the property key prefix that is being used to prepend to the property keys for Properties lookups. |
static java.util.List<TimerRateHolder> |
getTimerRateHolders(java.lang.String prefix,
java.util.Properties properties)
|
void |
setClockInterval(long cli)
|
void |
setLabel(java.lang.String lab)
|
void |
setPace(long pace)
|
void |
setProperties(java.util.Properties props)
Method to set the properties in the PropertyConsumer. |
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
Method to set the properties in the PropertyConsumer. |
void |
setPropertyPrefix(java.lang.String p)
Set the property key prefix that should be used by the PropertyConsumer. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_PACE_BASELINE_VALUE
public static final java.lang.String DEFAULT_PACE_FORMAT
public static final java.lang.String TimerRatesProperty
public static final java.lang.String PaceFormatProperty
public static final java.lang.String PaceBaselineProperty
public static final java.lang.String ClockIntervalProperty
public static final java.lang.String PaceProperty
protected java.lang.String label
protected long clockInterval
protected long pace
protected java.text.SimpleDateFormat paceFormat
protected java.lang.String paceZero
protected boolean valid
protected java.lang.String propPrefix
Constructor Detail |
---|
public TimerRateHolder()
public TimerRateHolder(java.text.SimpleDateFormat simpleDateFormat, java.lang.String dpz)
Method Detail |
---|
public void setLabel(java.lang.String lab)
public java.lang.String getLabel()
public void setPace(long pace)
public long getPace()
public void setClockInterval(long cli)
public long getClockInterval()
public java.lang.String toString()
toString
in class java.lang.Object
public void setProperties(java.util.Properties props)
PropertyConsumer
setProperties
in interface PropertyConsumer
props
- a properties object that the PropertyConsumer
can use to retrieve expected properties it can use for
configuration.public void setProperties(java.lang.String prefix, java.util.Properties props)
PropertyConsumer
setProperties
in interface PropertyConsumer
prefix
- a String used by the PropertyConsumer to prepend
to each property value it wants to look up -
setList.getProperty(prefix.propertyKey). If the prefix
had already been set, then the prefix passed in should
replace that previous value.props
- a Properties object that the PropertyConsumer
can use to retrieve expected properties it can use for
configuration.public java.util.Properties getProperties(java.util.Properties props)
PropertyConsumer
getProperties
in interface PropertyConsumer
props
- a Properties object to load the PropertyConsumer
properties into. If getList equals null, then a new
Properties object should be created.
public java.util.Properties getPropertyInfo(java.util.Properties props)
PropertyConsumer
getPropertyInfo
in interface PropertyConsumer
props
- a Properties object to load the PropertyConsumer
properties into. If getList equals null, then a new
Properties object should be created.
public java.lang.String getPropertyPrefix()
PropertyConsumer
getPropertyPrefix
in interface PropertyConsumer
public void setPropertyPrefix(java.lang.String p)
PropertyConsumer
setPropertyPrefix
in interface PropertyConsumer
p
- the prefix String.public static java.util.List<TimerRateHolder> getTimerRateHolders(java.lang.String prefix, java.util.Properties properties)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |