|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.ctdp.rfdynhud.properties.Property
net.ctdp.rfdynhud.properties.TimeProperty
public class TimeProperty
The TimeProperty
serves for customizing a time value.
Constructor Summary | |
---|---|
TimeProperty(java.lang.String name,
java.lang.String defaultValue)
|
|
TimeProperty(java.lang.String name,
java.lang.String defaultValue,
boolean readonly)
|
|
TimeProperty(java.lang.String name,
java.lang.String nameForDisplay,
java.lang.String defaultValue)
|
|
TimeProperty(java.lang.String name,
java.lang.String nameForDisplay,
java.lang.String defaultValue,
boolean readonly)
|
Method Summary | |
---|---|
java.lang.Long |
getDefaultValue()
Gets the default (initial) value fo this property. |
long |
getNanoValue()
Gets the current value as nano seconds. |
java.lang.String |
getTimeValue()
Gets the current value as a time string. |
java.lang.String |
getValue()
Gets the current value fo this property. |
void |
loadValue(PropertyLoader loader,
java.lang.String value)
Loads the value from the configuration file. |
protected void |
onKeeperSet()
|
protected void |
onValueChanged(java.lang.Long oldValue,
long newValue)
Invoked when the value has changed. |
boolean |
setNanoValue(long nanos)
Sets the property's value. |
protected boolean |
setNanoValue(long nanos,
boolean firstTime)
Sets the property's value. |
boolean |
setTimeValue(java.lang.String time)
Sets the property's value. |
void |
setValue(java.lang.Object value)
Sets the new value for this property. |
Methods inherited from class net.ctdp.rfdynhud.properties.Property |
---|
getButtonText, getButtonTooltip, getDocumentationSource, getEditorType, getKeeper, getName, getNameForDisplay, getValueForConfigurationFile, hasDefaultValue, isMatchingKey, isReadOnly, onButtonClicked, quoteValueInConfigurationFile, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TimeProperty(java.lang.String name, java.lang.String nameForDisplay, java.lang.String defaultValue, boolean readonly)
name
- the technical name used internally. See Property.getName()
.nameForDisplay
- the name displayed in the editor. See Property.getNameForDisplay()
. If null
is passed, the value of the name parameter is used.defaultValue
- the default valuereadonly
- read only property?public TimeProperty(java.lang.String name, java.lang.String nameForDisplay, java.lang.String defaultValue)
name
- the technical name used internally. See Property.getName()
.nameForDisplay
- the name displayed in the editor. See Property.getNameForDisplay()
. If null
is passed, the value of the name parameter is used.defaultValue
- the default valuepublic TimeProperty(java.lang.String name, java.lang.String defaultValue, boolean readonly)
name
- the technical name used internally. See Property.getName()
. 'nameForDisplay' is set to the same value.defaultValue
- the default valuereadonly
- read only property?public TimeProperty(java.lang.String name, java.lang.String defaultValue)
name
- the technical name used internally. See Property.getName()
. 'nameForDisplay' is set to the same value.defaultValue
- the default valueMethod Detail |
---|
public java.lang.Long getDefaultValue()
getDefaultValue
in class Property
protected void onKeeperSet()
onKeeperSet
in class Property
protected void onValueChanged(java.lang.Long oldValue, long newValue)
oldValue
- the old valuenewValue
- the new valueprotected final boolean setNanoValue(long nanos, boolean firstTime)
nanos
- the time in nano secondsfirstTime
-
public final boolean setNanoValue(long nanos)
nanos
- the time in nano seconds
public final long getNanoValue()
public final boolean setTimeValue(java.lang.String time)
time
- the new value in the format "00:00:00".
public final java.lang.String getTimeValue()
public void setValue(java.lang.Object value)
setValue
in class Property
value
- the new valuepublic java.lang.String getValue()
getValue
in class Property
public void loadValue(PropertyLoader loader, java.lang.String value)
loadValue
in class Property
loader
- the loadervalue
- the value to load
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |