Package jexer

Class THScroller

  • All Implemented Interfaces:
    java.lang.Comparable<TWidget>

    public class THScroller
    extends TWidget
    THScroller implements a simple horizontal scroll bar.
    • Constructor Detail

      • THScroller

        public THScroller​(TWidget parent,
                          int x,
                          int y,
                          int width)
        Public constructor.
        Parameters:
        parent - parent widget
        x - column relative to parent
        y - row relative to parent
        width - height of scroll bar
    • Method Detail

      • onMouseUp

        public void onMouseUp​(TMouseEvent mouse)
        Handle mouse button releases.
        Overrides:
        onMouseUp in class TWidget
        Parameters:
        mouse - mouse button release event
      • onMouseMotion

        public void onMouseMotion​(TMouseEvent mouse)
        Handle mouse movement events.
        Overrides:
        onMouseMotion in class TWidget
        Parameters:
        mouse - mouse motion event
      • onMouseDown

        public void onMouseDown​(TMouseEvent mouse)
        Handle mouse button press events.
        Overrides:
        onMouseDown in class TWidget
        Parameters:
        mouse - mouse button press event
      • draw

        public void draw()
        Draw a horizontal scroll bar.
        Overrides:
        draw in class TWidget
      • getLeftValue

        public int getLeftValue()
        Get the value that corresponds to being on the left edge of the scroll bar.
        Returns:
        the scroll value
      • setLeftValue

        public void setLeftValue​(int leftValue)
        Set the value that corresponds to being on the left edge of the scroll bar.
        Parameters:
        leftValue - the new scroll value
      • getRightValue

        public int getRightValue()
        Get the value that corresponds to being on the right edge of the scroll bar.
        Returns:
        the scroll value
      • setRightValue

        public void setRightValue​(int rightValue)
        Set the value that corresponds to being on the right edge of the scroll bar.
        Parameters:
        rightValue - the new scroll value
      • getValue

        public int getValue()
        Get current value of the scroll.
        Returns:
        the scroll value
      • setValue

        public void setValue​(int value)
        Set current value of the scroll.
        Parameters:
        value - the new scroll value
      • getSmallChange

        public int getSmallChange()
        Get the increment for clicking on an arrow.
        Returns:
        the increment value
      • setSmallChange

        public void setSmallChange​(int smallChange)
        Set the increment for clicking on an arrow.
        Parameters:
        smallChange - the new increment value
      • getBigChange

        public int getBigChange()
        Set the increment for clicking in the bar between the box and an arrow.
        Returns:
        the increment value
      • setBigChange

        public void setBigChange​(int bigChange)
        Set the increment for clicking in the bar between the box and an arrow.
        Parameters:
        bigChange - the new increment value
      • decrement

        public void decrement()
        Perform a small step change left.
      • increment

        public void increment()
        Perform a small step change right.
      • bigDecrement

        public void bigDecrement()
        Perform a big step change left.
      • bigIncrement

        public void bigIncrement()
        Perform a big step change right.
      • toLeft

        public void toLeft()
        Go to the left edge of the scroller.
      • toRight

        public void toRight()
        Go to the right edge of the scroller.