Package voltage.core

# Class VoltageKnob

java.lang.Object
voltage.core.VoltageComponent
voltage.core.VoltageKnob

public class VoltageKnob extends VoltageComponent
Knobs - the staple of modular systems.

- ## Field Summary

  ### Fields inherited from class voltage.core.VoltageComponent

  `componentName, displayName`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VoltageKnob(String internalName, String displayName, VoltageModule module, double min, double max, double startValue)`
  Creates a knob.
  `VoltageKnob(String name, VoltageModule module, double min, double max, double startValue)`
  Creates a knob.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `DisplayValueInPercent(boolean displayPercent)`
  Is this a % control?
  `double`
  `GetDefaultValue()`
  Returns the default value.
  `boolean`
  `GetKnobAdjustsRing()`
  Does the knob adjust the ring?
  `double`
  `GetMidpointValue()`
  Gets midpoint value.
  `double`
  `GetRangeSkewValue()`
  Gets the skew range value.
  `String`
  `GetRingSkin()`
  Returns the name of the ring skin resource.
  `double`
  `GetRingValue()`
  Gets the ring value.
  `String`
  `GetTooltipText()`
  Get the tooltip of the current value.
  `boolean`
  `HasNonLinearRange()`
  Is this knob non-linear? IE: Does it skew?
  `boolean`
  `IsSkewedFromCenter()`
  Is it skewed from the center?
  `void`
  `SetDialRingSkin(String skinName)`
  Deprecated.
  `void`
  `SetKnobAdjustsRing(boolean bKnobSetsRing)`
  Sets the knob's value to adjust the ring.
  `void`
  `SetKnobParams(float startAngleDeg, float endAngleDeg)`
  Set the start and end angle.
  `void`
  `SetMidpointValue(double value)`
  Sets the mid point of the knob.
  `void`
  `SetMouseSensitivity(double sensitivity)`
  Sets the knob sensitivity.
  `void`
  `SetRange(double min, double max, double startValue, boolean bShowLevelFromCenterPos, int numberOfStops)`
  Sets the range and other knob settings.
  `void`
  `SetRangeSkewValue(double value, boolean skewFromCenter)`
  Sets how this knob skews.
  `void`
  `SetRingSkin(String skinName)`
  Sets the outer ring skin.
  `void`
  `SetRingValue(double zeVal)`
  Sets the knob's ring value.
  `void`
  `SetValue(double newValue, boolean bUpdateGUI)`
  Sets the value of the knob.
  `void`
  `SetValueNoNotification(double newValue, boolean bUpdateGUI)`
  Sets the value of the knob without sending a notification.
  `double`
  `SkewNormalizedValue(double input)`
  Adjusts a normalized control value (0-1.0) to account for skew settings

  ### Methods inherited from class voltage.core.VoltageComponent

  `AddChildComponent, GetComponentID, GetDisplayName, GetHeight, GetMaxValue, GetMinValue, GetRect, GetSkin, GetTransparency, GetUserProperty, GetValue, GetWidth, GetX, GetY, IsEnabled, IsVisible, RemoveChildComponent, SetCanBeAutomated, SetEnabled, SetPosition, SetRect, SetRect, SetSize, SetSkin, SetTransparency, SetUnits, SetUserProperty, SetValue, SetVisible, SetWantsMouseNotifications, SetZOrder, UpdateGUIValue, WantsMouseNotifications`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### VoltageKnob

    public VoltageKnob(String internalName, String displayName, VoltageModule module, double min, double max, double startValue)
    Creates a knob.
    Parameters:
      `internalName` - the control's name
      `displayName` - the name the user sees
      `module` - the owner of this control
      `min` - the minimum value
      `max` - the maximum value
      `startValue` - the starting/default value of this control

  - ### VoltageKnob

    public VoltageKnob(String name, VoltageModule module, double min, double max, double startValue)
    Creates a knob.
    Parameters:
      `name` - the control's name
      `module` - the owner of this control
      `min` - the minimum value
      `max` - the maximum value
      `startValue` - the starting/default value of this control

- ## Method Details

  - ### GetDefaultValue

    public double GetDefaultValue()
    Returns the default value.
    Returns:
      the default value.

  - ### SetRange

    public void SetRange(double min, double max, double startValue, boolean bShowLevelFromCenterPos, int numberOfStops)
    Sets the range and other knob settings.
    Parameters:
      `min` - the minimum value
      `max` - the maximum value
      `startValue` - the default value
      `bShowLevelFromCenterPos` - sets this up like a pan control.
      `numberOfStops` - The number of stops/discrete values.

  - ### DisplayValueInPercent

    public void DisplayValueInPercent(boolean displayPercent)
    Is this a % control?
    Parameters:
      `displayPercent` - if true, it will display tooltips as a percentage.

  - ### SetRingSkin

    public void SetRingSkin(String skinName)
    Sets the outer ring skin. A ring around the knob can be used to indicate the current setting or the current value.
    Parameters:
      `skinName` - the resource name of the ring skin.

  - ### GetRingSkin

    public String GetRingSkin()
    Returns the name of the ring skin resource.
    Returns:
      the name of the ring skin resource.

  - ### SetKnobAdjustsRing

    public void SetKnobAdjustsRing(boolean bKnobSetsRing)
    Sets the knob's value to adjust the ring.
    Parameters:
      `bKnobSetsRing` - set to true to have the knob value adjust the ring.

  - ### GetKnobAdjustsRing

    public boolean GetKnobAdjustsRing()
    Does the knob adjust the ring?
    Returns:
      does the knob adjust the ring?

  - ### SetRingValue

    public void SetRingValue(double zeVal)
    Sets the knob's ring value.
    Parameters:
      `zeVal` - the value to set the ring.

  - ### GetRingValue

    public double GetRingValue()
    Gets the ring value.
    Returns:
      the value of the ring.

  - ### SetMidpointValue

    public void SetMidpointValue(double value)
    Sets the mid point of the knob.
    Parameters:
      `value` - the middle point of the knob.

  - ### SetRangeSkewValue

    public void SetRangeSkewValue(double value, boolean skewFromCenter)
    Sets how this knob skews.
    Parameters:
      `value` - the skew value adjusts how the knob adjusts from the midpoint value. if less than 1.0 will fill more value into the lower range. Otherwise, it will place more value into the higher range.
      `skewFromCenter` - should it skew from the center?

  - ### GetMidpointValue

    public double GetMidpointValue()
    Gets midpoint value.
    Returns:
      the midpoint.

  - ### IsSkewedFromCenter

    public boolean IsSkewedFromCenter()
    Is it skewed from the center?
    Returns:
      true if it's skewed from the center.

  - ### GetRangeSkewValue

    public double GetRangeSkewValue()
    Gets the skew range value. if less than 1.0 values skew more to the lower range. if greater than 1.0 values skew more to the higher range.
    Returns:
      the range skew value.

  - ### HasNonLinearRange

    public boolean HasNonLinearRange()
    Is this knob non-linear? IE: Does it skew?
    Returns:
      true if it skews or is non-linear.

  - ### SetKnobParams

    public void SetKnobParams(float startAngleDeg, float endAngleDeg)
    Set the start and end angle.
    Parameters:
      `startAngleDeg` - the start angle of the knob.
      `endAngleDeg` - the ending angle of the knob.

  - ### SetMouseSensitivity

    public void SetMouseSensitivity(double sensitivity)
    Sets the knob sensitivity.
    Parameters:
      `sensitivity` - sets the mouse sensitivity indicating how far the mouse has to drag to traverse the whole range of the knob (0.1 to 4.0 ) Normal sensitivity is 1.0

  - ### SetValue

    public void SetValue(double newValue, boolean bUpdateGUI)
    Sets the value of the knob.
    Overrides:
      `SetValue` in class `VoltageComponent`
    Parameters:
      `newValue` - the new value of the knob.
      `bUpdateGUI` - should the gui be updated?

  - ### SetValueNoNotification

    public void SetValueNoNotification(double newValue, boolean bUpdateGUI)
    Sets the value of the knob without sending a notification.
    Overrides:
      `SetValueNoNotification` in class `VoltageComponent`
    Parameters:
      `newValue` - the new value of the knob.
      `bUpdateGUI` - should the gui be updated?

  - ### GetTooltipText

    public String GetTooltipText()
    Get the tooltip of the current value. Units will be displayed in decibels or percentage.
    Overrides:
      `GetTooltipText` in class `VoltageComponent`
    Returns:
      The tool tip text for this control

  - ### SetDialRingSkin

    @Deprecated public void SetDialRingSkin(String skinName)
    Deprecated.

  - ### SkewNormalizedValue

    public double SkewNormalizedValue(double input)
    Adjusts a normalized control value (0-1.0) to account for skew settings
    Overrides:
      `SkewNormalizedValue` in class `VoltageComponent`
    Parameters:
      `input` - the normalized control value, from 0 to 1.0.
    Returns:
      the adjusted normalzied value, accounting for control skew settings