|
||||||||||
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.IntProperty
net.ctdp.rfdynhud.properties.FactoredIntProperty
public class FactoredIntProperty
The FactoredIntProperty
serves for customizing a primitive int value multiplied or divided by a factor.
Constructor Summary | |
---|---|
FactoredIntProperty(java.lang.String name,
int factor,
int divisor,
int defaultValue,
int minValue,
int maxValue)
|
|
FactoredIntProperty(java.lang.String name,
int factor,
int divisor,
int defaultValue,
int minValue,
int maxValue,
boolean readonly)
|
|
FactoredIntProperty(java.lang.String name,
java.lang.String nameForDisplay,
int factor,
int divisor,
int defaultValue,
int minValue,
int maxValue)
|
|
FactoredIntProperty(java.lang.String name,
java.lang.String nameForDisplay,
int factor,
int divisor,
int defaultValue,
int minValue,
int maxValue,
boolean readonly)
|
Method Summary | |
---|---|
protected long |
deriveValue(int value,
int factor,
int divisor)
This method is utilized to derive the factored value from the property value. |
int |
getDivisor()
Gets the divisor. |
int |
getFactor()
Gets the factor. |
double |
getFactoredDoubleValue()
Gets the value multiplied by the factor or divided by the divisor. |
long |
getFactoredValue()
Gets the value multiplied by the factor or divided by the divisor. |
Methods inherited from class net.ctdp.rfdynhud.properties.IntProperty |
---|
fixValue, getDefaultValue, 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, 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 FactoredIntProperty(java.lang.String name, java.lang.String nameForDisplay, int factor, int divisor, int defaultValue, int minValue, int maxValue, 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.factor
- the factor (0 for divisor usage)divisor
- the divisor (0 for factor usage)defaultValue
- the default valueminValue
- the minimum valuemaxValue
- the maximum valuereadonly
- read only property?public FactoredIntProperty(java.lang.String name, java.lang.String nameForDisplay, int factor, int divisor, int defaultValue, int minValue, int maxValue)
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.factor
- the factor (0 for divisor usage)divisor
- the divisor (0 for factor usage)defaultValue
- the default valueminValue
- the minimum valuemaxValue
- the maximum valuepublic FactoredIntProperty(java.lang.String name, int factor, int divisor, int defaultValue, int minValue, int maxValue, boolean readonly)
name
- the technical name used internally. See Property.getName()
. 'nameForDisplay' is set to the same value.factor
- the factor (0 for divisor usage)divisor
- the divisor (0 for factor usage)defaultValue
- the default valueminValue
- the minimum valuemaxValue
- the maximum valuereadonly
- read only property?public FactoredIntProperty(java.lang.String name, int factor, int divisor, int defaultValue, int minValue, int maxValue)
name
- the technical name used internally. See Property.getName()
. 'nameForDisplay' is set to the same value.factor
- the factor (0 for divisor usage)divisor
- the divisor (0 for factor usage)defaultValue
- the default valueminValue
- the minimum valuemaxValue
- the maximum valueMethod Detail |
---|
public final int getFactor()
getDivisor()
public final int getDivisor()
getFactor()
protected long deriveValue(int value, int factor, int divisor)
value
- the property valuefactor
- the factor (zero, if divisor is used)divisor
- the divisor (zero, if factor is used)
public final long getFactoredValue()
public final double getFactoredDoubleValue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |