FactoredFloatProperty

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.ctdp.rfdynhud.properties
Class FactoredFloatProperty

    java.lang.Object
      net.ctdp.rfdynhud.properties.Property
          net.ctdp.rfdynhud.properties.FloatProperty
              net.ctdp.rfdynhud.properties.FactoredFloatProperty

    public class FactoredFloatProperty

extends FloatProperty

The `FactoredFloatProperty` serves for customizing a primitive float value multiplied by a factor.

Author:
  Marvin Froehlich (CTDP)

Field Summary
`static float` | `FACTOR_DEGREES_TO_RADIANS`

Constructor Summary
`FactoredFloatProperty(java.lang.String name, float factor, float defaultValue, float minValue, float maxValue)`
`FactoredFloatProperty(java.lang.String name, float factor, int defaultValue, float minValue, float maxValue, boolean readonly)`
`FactoredFloatProperty(java.lang.String name, java.lang.String nameForDisplay, float factor, float defaultValue, float minValue, float maxValue)`
`FactoredFloatProperty(java.lang.String name, java.lang.String nameForDisplay, float factor, float defaultValue, float minValue, float maxValue, boolean readonly)`

Method Summary
`protected float` | `deriveValue(float value, float factor)` This method is utilized to derive the factored value from the property value.
`float` | `getFactor()` Gets the factor.
`float` | `getFactoredValue()` Gets the value multiplied by the factor.

Methods inherited from class net.ctdp.rfdynhud.properties.FloatProperty
`fixValue, getDefaultValue, getFloatValue, getIntValue, getIntValue, getMaxValue, getMinValue, getValue, loadValue, onKeeperSet, onValueChanged, setFloatValue, setFloatValue, 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`

Field Detail

### FACTOR_DEGREES_TO_RADIANS

    public static final float FACTOR_DEGREES_TO_RADIANS

See Also:
  Constant Field Values

Constructor Detail

### FactoredFloatProperty

    public FactoredFloatProperty(java.lang.String name,
                                 java.lang.String nameForDisplay,
                                 float factor,
                                 float defaultValue,
                                 float minValue,
                                 float 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.
  `factor` - the factor
  `defaultValue` - the default value
  `minValue` - the minimum value
  `maxValue` - the maximum value
  `readonly` - read only property?

### FactoredFloatProperty

    public FactoredFloatProperty(java.lang.String name,
                                 java.lang.String nameForDisplay,
                                 float factor,
                                 float defaultValue,
                                 float minValue,
                                 float maxValue)

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.
  `factor` - the factor
  `defaultValue` - the default value
  `minValue` - the minimum value
  `maxValue` - the maximum value

### FactoredFloatProperty

    public FactoredFloatProperty(java.lang.String name,
                                 float factor,
                                 int defaultValue,
                                 float minValue,
                                 float maxValue,
                                 boolean readonly)

Parameters:
  `name` - the technical name used internally. See `Property.getName()`. 'nameForDisplay' is set to the same value.
  `factor` - the factor
  `defaultValue` - the default value
  `minValue` - the minimum value
  `maxValue` - the maximum value
  `readonly` - read only property?

### FactoredFloatProperty

    public FactoredFloatProperty(java.lang.String name,
                                 float factor,
                                 float defaultValue,
                                 float minValue,
                                 float maxValue)

Parameters:
  `name` - the technical name used internally. See `Property.getName()`. 'nameForDisplay' is set to the same value.
  `factor` - the factor
  `defaultValue` - the default value
  `minValue` - the minimum value
  `maxValue` - the maximum value

Method Detail

### getFactor

    public final float getFactor()

  Gets the factor.

  Returns:
    the factor.

### deriveValue

    protected float deriveValue(float value,
                                float factor)

  This method is utilized to derive the factored value from the property value.

  Parameters:
    `value` - the property value
    `factor` - the factor
  Returns:
    the derived value.

### getFactoredValue

    public final float getFactoredValue()

  Gets the value multiplied by the factor.

  Returns:
    the value multiplied by the factor.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD