Package voltage.core

# Class VoltageSlider

java.lang.Object
voltage.core.VoltageComponent
voltage.core.VoltageSlider

public class VoltageSlider extends VoltageComponent
Slider class

- ## Field Summary

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

  `componentName, displayName`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VoltageSlider(String name, String displayName, VoltageModule module, boolean bIsVertical, double min, double max, double startValue, int numStops)`
  Constructor
  `VoltageSlider(String name, VoltageModule module, boolean bIsVertical, double min, double max, double startValue, int numStops)`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `DisplayValueInPercent(boolean displayPercent)`
  Should the control be displayed in percentage?
  `double`
  `GetDefaultValue()`
  Gets the default or starting value of this slider.
  `double`
  `GetMidpointValue()`
  Get the mid point value of the slider.
  `int`
  `GetRangeMaxBlankPixels()`
  Returns the current number of pixels a slider background has been shrunk at its maximum end
  `int`
  `GetRangeMinBlankPixels()`
  Returns the current number of pixels a slider background has been shrunk at its minimum end
  `double`
  `GetRangeSkewValue()`
  Get the skew amount.
  `String`
  `GetTooltipText()`
  Gets the tooltip text value.
  `boolean`
  `HasNonLinearRange()`
  Is it skewed?
  `boolean`
  `IsSkewedFromCenter()`
  Is it skewed from the center?
  `void`
  `SetMidpointValue(double value)`
  Sets the mid point value.
  `void`
  `SetMouseDownRelativeDragMode(boolean bSetRelativeDrag)`
  Determines if the slider's thumb jumps to the mouse position when clicking down.
  `void`
  `SetMouseSensitivity(double sensitivity)`
  Sets the mouse sensitivity
  `void`
  `SetRange(double minValue, double maxValue, double startValue, int numStops)`
  Sets the range of the slider.
  `void`
  `SetRangeMaxBlankPixels(int numPixels)`
  Shrinks the slider background at its maximum end (top for vertical sliders, right for horizontal sliders)
  `void`
  `SetRangeMinBlankPixels(int numPixels)`
  Shrinks the slider background at its minimum end (bottom for vertical sliders, left for horizontal sliders)
  `void`
  `SetRangeSkewValue(double value, boolean skewFromCenter)`
  Set a skew amount
  `void`
  `SetSliderSize(int width, int height)`
  Sets the size of the slider
  `void`
  `SetTrackSize(int zeSize)`
  Set the track size of the slider.
  `void`
  `SetValue(double newValue, boolean bUpdateGUI)`
  Sets the value of this control.
  `void`
  `SetValueNoNotification(double newValue, boolean bUpdateGUI)`
  Sets the value of this control 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

  - ### VoltageSlider

    public VoltageSlider(String name, String displayName, VoltageModule module, boolean bIsVertical, double min, double max, double startValue, int numStops)
    Constructor
    Parameters:
      `name` - the internal name of the slider.
      `displayName` - the display name of the slider.
      `module` - the module this belongs to.
      `bIsVertical` - if true, this is a vertical slider.
      `min` - the min value for the slider.
      `max` - the max value for the slider.
      `startValue` - the starting value.
      `numStops` - if greater than 0, this will create a discrete number of stops.

  - ### VoltageSlider

    public VoltageSlider(String name, VoltageModule module, boolean bIsVertical, double min, double max, double startValue, int numStops)
    Constructor
    Parameters:
      `name` - the internal name of the slider.
      `module` - the module this belongs to.
      `bIsVertical` - if true, this is a vertical slider.
      `min` - the min value for the slider.
      `max` - the max value for the slider.
      `startValue` - the starting value.
      `numStops` - if greater than 0, this will create a discrete number of stops.

- ## Method Details

  - ### SetRange

    public void SetRange(double minValue, double maxValue, double startValue, int numStops)
    Sets the range of the slider.
    Parameters:
      `minValue` - the min value for the slider.
      `maxValue` - the max value for the slider.
      `startValue` - the starting value.
      `numStops` - if greater than 0, this will create a discrete number of stops.

  - ### GetDefaultValue

    public double GetDefaultValue()
    Gets the default or starting value of this slider.
    Returns:
      the default value.

  - ### DisplayValueInPercent

    public void DisplayValueInPercent(boolean displayPercent)
    Should the control be displayed in percentage?
    Parameters:
      `displayPercent` - set to true to see the value in percentage form.

  - ### SetMidpointValue

    public void SetMidpointValue(double value)
    Sets the mid point value. Some controls have a skewed range and the middle value is not in the center of the slider.
    Parameters:
      `value` - is the value at the middle of the slider.

  - ### SetRangeSkewValue

    public void SetRangeSkewValue(double value, boolean skewFromCenter)
    Set a skew amount
    Parameters:
      `value` - is the skew amount.
      `skewFromCenter` - should this be skewed from the center?

  - ### GetMidpointValue

    public double GetMidpointValue()
    Get the mid point value of the slider.
    Returns:
      the midpoint value.

  - ### IsSkewedFromCenter

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

  - ### GetRangeSkewValue

    public double GetRangeSkewValue()
    Get the skew amount.
    Returns:
      the skewed amount for the slider.

  - ### HasNonLinearRange

    public boolean HasNonLinearRange()
    Is it skewed?
    Returns:
      true if skewed

  - ### SetMouseDownRelativeDragMode

    public void SetMouseDownRelativeDragMode(boolean bSetRelativeDrag)
    Determines if the slider's thumb jumps to the mouse position when clicking down.
    Parameters:
      `bSetRelativeDrag` - set to true to make clicking down and dragging relative to the mouse down location.

  - ### SetMouseSensitivity

    public void SetMouseSensitivity(double sensitivity)
    Sets the mouse 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

  - ### SetSliderSize

    public void SetSliderSize(int width, int height)
    Sets the size of the slider
    Parameters:
      `width` - the new width
      `height` - the new height

  - ### SetTrackSize

    public void SetTrackSize(int zeSize)
    Set the track size of the slider.
    Parameters:
      `zeSize` - the size of the track.

  - ### SetValue

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

  - ### SetValueNoNotification

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

  - ### SetRangeMinBlankPixels

    public void SetRangeMinBlankPixels(int numPixels)
    Shrinks the slider background at its minimum end (bottom for vertical sliders, left for horizontal sliders)
    Parameters:
      `numPixels` - the number of pixels by which to shrink the slider

  - ### GetRangeMinBlankPixels

    public int GetRangeMinBlankPixels()
    Returns the current number of pixels a slider background has been shrunk at its minimum end

  - ### SetRangeMaxBlankPixels

    public void SetRangeMaxBlankPixels(int numPixels)
    Shrinks the slider background at its maximum end (top for vertical sliders, right for horizontal sliders)
    Parameters:
      `numPixels` - the number of pixels by which to shrink the slider

  - ### GetRangeMaxBlankPixels

    public int GetRangeMaxBlankPixels()
    Returns the current number of pixels a slider background has been shrunk at its maximum end

  - ### GetTooltipText

    public String GetTooltipText()
    Gets the tooltip text value.
    Overrides:
      `GetTooltipText` in class `VoltageComponent`
    Returns:
      the text for the tooltip.

  - ### 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