Package jexer

Class TVScroller

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

    public class TVScroller
    extends TWidget
    TVScroller implements a simple vertical scroll bar.
    • Constructor Detail

      • TVScroller

        public TVScroller​(TWidget parent,
                          int x,
                          int y,
                          int height)
        Public constructor.
        Parameters:
        parent - parent widget
        x - column relative to parent
        y - row relative to parent
        height - 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 press events.
        Overrides:
        onMouseDown in class TWidget
        Parameters:
        mouse - mouse button press event
      • draw

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

        public int getTopValue()
        Get the value that corresponds to being on the top edge of the scroll bar.
        Returns:
        the scroll value
      • setTopValue

        public void setTopValue​(int topValue)
        Set the value that corresponds to being on the top edge of the scroll bar.
        Parameters:
        topValue - the new scroll value
      • getBottomValue

        public int getBottomValue()
        Get the value that corresponds to being on the bottom edge of the scroll bar.
        Returns:
        the scroll value
      • setBottomValue

        public void setBottomValue​(int bottomValue)
        Set the value that corresponds to being on the bottom edge of the scroll bar.
        Parameters:
        bottomValue - 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 up.
      • increment

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

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

        public void bigIncrement()
        Perform a big step change down.
      • toTop

        public void toTop()
        Go to the top edge of the scroller.
      • toBottom

        public void toBottom()
        Go to the bottom edge of the scroller.