net.ctdp.rfdynhud.properties
Class DelayProperty
java.lang.Object
net.ctdp.rfdynhud.properties.Property
net.ctdp.rfdynhud.properties.IntProperty
net.ctdp.rfdynhud.properties.DelayProperty
public class DelayProperty
- extends IntProperty
The DelayProperty
serves for customizing a time delay.
A time delay is always measured in nano seconds internally.
This property provides the value in other units like milliseconds for easier use.
- Author:
- Marvin Froehlich (CTDP)
Constructor Summary |
DelayProperty(java.lang.String name,
DelayProperty.DisplayUnits displayUnits,
int defaultValue)
|
DelayProperty(java.lang.String name,
DelayProperty.DisplayUnits displayUnits,
int defaultValue,
boolean readonly)
|
DelayProperty(java.lang.String name,
DelayProperty.DisplayUnits displayUnits,
int defaultValue,
int minValue,
int maxValue)
|
DelayProperty(java.lang.String name,
java.lang.String nameForDisplay,
DelayProperty.DisplayUnits displayUnits,
int defaultValue)
|
DelayProperty(java.lang.String name,
java.lang.String nameForDisplay,
DelayProperty.DisplayUnits displayUnits,
int defaultValue,
boolean readonly)
|
DelayProperty(java.lang.String name,
java.lang.String nameForDisplay,
DelayProperty.DisplayUnits displayUnits,
int defaultValue,
int minValue,
int maxValue,
boolean readonly)
|
Methods inherited from class net.ctdp.rfdynhud.properties.IntProperty |
fixValue, getFloatValue, getIntValue, getMaxValue, getMinValue, getValue, loadValue, onKeeperSet, onValueChanged, setIntValue, setIntValue, setValue |
Methods inherited from class net.ctdp.rfdynhud.properties.Property |
getButtonText, getButtonTooltip, getDocumentationSource, getEditorType, getKeeper, getName, getNameForDisplay, getValueForConfigurationFile, isMatchingKey, isReadOnly, onButtonClicked, quoteValueInConfigurationFile, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DelayProperty
public DelayProperty(java.lang.String name,
java.lang.String nameForDisplay,
DelayProperty.DisplayUnits displayUnits,
int defaultValue,
int minValue,
int maxValue,
boolean readonly)
- Parameters:
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.displayUnits
- the units to display the value indefaultValue
- the default valueminValue
- the minimum valuemaxValue
- the maximum valuereadonly
- read only property?
DelayProperty
public DelayProperty(java.lang.String name,
java.lang.String nameForDisplay,
DelayProperty.DisplayUnits displayUnits,
int defaultValue,
boolean readonly)
- Parameters:
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.displayUnits
- the units to display the value indefaultValue
- the default valuereadonly
- read only property?
DelayProperty
public DelayProperty(java.lang.String name,
java.lang.String nameForDisplay,
DelayProperty.DisplayUnits displayUnits,
int defaultValue)
- Parameters:
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.displayUnits
- the units to display the value indefaultValue
- the default value
DelayProperty
public DelayProperty(java.lang.String name,
DelayProperty.DisplayUnits displayUnits,
int defaultValue,
boolean readonly)
- Parameters:
name
- the technical name used internally. See Property.getName()
. 'nameForDisplay' is set to the same value.displayUnits
- the units to display the value indefaultValue
- the default valuereadonly
- read only property?
DelayProperty
public DelayProperty(java.lang.String name,
DelayProperty.DisplayUnits displayUnits,
int defaultValue)
- Parameters:
name
- the technical name used internally. See Property.getName()
. 'nameForDisplay' is set to the same value.displayUnits
- the units to display the value indefaultValue
- the default value
DelayProperty
public DelayProperty(java.lang.String name,
DelayProperty.DisplayUnits displayUnits,
int defaultValue,
int minValue,
int maxValue)
- Parameters:
name
- the technical name used internally. See Property.getName()
. 'nameForDisplay' is set to the same value.displayUnits
- the units to display the value indefaultValue
- the default valueminValue
- the minimum valuemaxValue
- the maximum value
getDisplayUnits
public final DelayProperty.DisplayUnits getDisplayUnits()
- Gets the used
DelayProperty.DisplayUnits
.
- Returns:
- the used
DelayProperty.DisplayUnits
.
deriveDelay
protected long deriveDelay(int value,
DelayProperty.DisplayUnits displayUnits)
- This method is utilized to derive the delay value from the property value.
- Parameters:
value
- the property valuedisplayUnits
- the used DelayProperty.DisplayUnits
- Returns:
- the derived delay value.
getDelayNanos
public final long getDelayNanos()
- The actual delay values in nanoseconds.
- Returns:
- actual delay values in nanoseconds.
getDelaySeconds
public final float getDelaySeconds()
- The actual delay values in seconds.
- Returns:
- actual delay values in seconds.