Package voltage.core

# Class VoltageScrollbar

java.lang.Object
voltage.core.VoltageComponent
voltage.core.VoltageScrollbar

public class VoltageScrollbar extends VoltageComponent
Scrollbar class

- ## Field Summary

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

  `componentName, displayName`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VoltageScrollbar(String name, String displayName, VoltageModule module)`
  Constructor
  `VoltageScrollbar(String name, String displayName, VoltageModule module, boolean bVertical, boolean bAutoHide)`
  Constructor
  `VoltageScrollbar(String name, VoltageModule module)`
  Constructor
  `VoltageScrollbar(String name, VoltageModule module, boolean bVertical, boolean bAutoHide)`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `GetPosition()`
  Returns the position of the scroll bar.
  `int`
  `GetRangeEnd()`
  Returns the end value of the range.
  `int`
  `GetRangeStart()`
  Returns the start value of the range.
  `int`
  `GetSingleStepSize()`
  Get the single step increment amount.
  `int`
  `GetThumbSize()`
  Returns the size of the thumb.
  `void`
  `ScrollTo(int newValue)`
  Scroll to a position.
  `void`
  `SetBackgroundColor(int red, int green, int blue, int alpha)`
  Set the background color of the scrollbar.
  `void`
  `SetRange(int low, int high)`
  Set the scrollbar range.
  `void`
  `SetSingleStepSize(int newStepSize)`
  Set the single step size.
  `void`
  `SetThumbColor(int red, int green, int blue, int alpha)`
  Set the thumb's color.
  `void`
  `SetThumbCornerSize(double cornerSize)`
  Set the corner size for the scrollbar thumb.
  `void`
  `SetThumbSize(int zeThumbSize)`
  Set the thumb size.

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

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

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

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

- ## Constructor Details

  - ### VoltageScrollbar

    public VoltageScrollbar(String name, String displayName, VoltageModule module)
    Constructor
    Parameters:
      `name` - internal name of the control
      `displayName` - display name of the control.
      `module` - the module this belongs to.

  - ### VoltageScrollbar

    public VoltageScrollbar(String name, String displayName, VoltageModule module, boolean bVertical, boolean bAutoHide)
    Constructor
    Parameters:
      `name` - internal name of the control
      `displayName` - display name of the control.
      `module` - the module this belongs to.
      `bVertical` - set to true to make it a vertical scrollbar.
      `bAutoHide` - set to true to not show the scrollbar if the range is less than the size of the scrollbar.

  - ### VoltageScrollbar

    public VoltageScrollbar(String name, VoltageModule module)
    Constructor
    Parameters:
      `name` - internal name of the control
      `module` - the module this belongs to.

  - ### VoltageScrollbar

    public VoltageScrollbar(String name, VoltageModule module, boolean bVertical, boolean bAutoHide)
    Constructor
    Parameters:
      `name` - internal name of the control
      `module` - the module this belongs to.
      `bVertical` - set to true to make it a vertical scrollbar.
      `bAutoHide` - set to true to not show the scrollbar if the range is less than the size of the scrollbar.

- ## Method Details

  - ### GetPosition

    public int GetPosition()
    Returns the position of the scroll bar.
    Returns:
      the position

  - ### GetRangeStart

    public int GetRangeStart()
    Returns the start value of the range.
    Returns:
      the range start.

  - ### GetRangeEnd

    public int GetRangeEnd()
    Returns the end value of the range.
    Returns:
      the range end.

  - ### GetThumbSize

    public int GetThumbSize()
    Returns the size of the thumb.
    Returns:
      the thumb's size. The thumb will get smaller as the range gets bigger than the size of the scrollbar.

  - ### GetSingleStepSize

    public int GetSingleStepSize()
    Get the single step increment amount.
    Returns:
      the size of a single step.

  - ### SetRange

    public void SetRange(int low, int high)
    Set the scrollbar range.
    Parameters:
      `low` - the lower end of the range.
      `high` - the high end of the range.

  - ### SetThumbSize

    public void SetThumbSize(int zeThumbSize)
    Set the thumb size.
    Parameters:
      `zeThumbSize` - the size of the thumb.

  - ### SetSingleStepSize

    public void SetSingleStepSize(int newStepSize)
    Set the single step size. When clicking in the areas next to the thumb, this will increment the scoll position by this amount.
    Parameters:
      `newStepSize` - the step size to increment the scrollbar when clicking.

  - ### ScrollTo

    public void ScrollTo(int newValue)
    Scroll to a position.
    Parameters:
      `newValue` - the new scroll position.

  - ### SetThumbColor

    public void SetThumbColor(int red, int green, int blue, int alpha)
    Set the thumb's color.
    Parameters:
      `red` - (0-255)
      `green` - (0-255)
      `blue` - (0-255)
      `alpha` - (0-255)

  - ### SetBackgroundColor

    public void SetBackgroundColor(int red, int green, int blue, int alpha)
    Set the background color of the scrollbar.
    Parameters:
      `red` - (0-255)
      `green` - (0-255)
      `blue` - (0-255)
      `alpha` - (0-255)

  - ### SetThumbCornerSize

    public void SetThumbCornerSize(double cornerSize)
    Set the corner size for the scrollbar thumb.
    Parameters:
      `cornerSize` - 0 - would be no corners.