Class TerraScrollBarSkin.AutomaticScroller

  • Enclosing class:
    TerraScrollBarSkin

    protected class TerraScrollBarSkin.AutomaticScroller
    extends java.lang.Object
    Encapsulates the code needed to perform timer-controlled scrolling. This class is used by TerraScrollBarSkin (automatic block increment scrolling) and ScrollButtonSkin (automatic unit increment scrolling).
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AutomaticScroller()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void start​(int directionArgument, Mouse.ScrollType incrementTypeArgument, int stopValueArgument)
      Starts scrolling this skin's scroll bar, stopping the scroll when the specified value has been reached.
      void stop()
      Stops any automatic scrolling in progress.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • direction

        public int direction
      • stopValue

        public int stopValue
    • Constructor Detail

      • AutomaticScroller

        protected AutomaticScroller()
    • Method Detail

      • start

        public void start​(int directionArgument,
                          Mouse.ScrollType incrementTypeArgument,
                          int stopValueArgument)
        Starts scrolling this skin's scroll bar, stopping the scroll when the specified value has been reached.
        Parameters:
        directionArgument - 1 to adjust the scroll bar's value larger; -1 to adjust it smaller
        incrementTypeArgument - Determines whether we'll use the scroll bar's unit increment or the block increment when scrolling
        stopValueArgument - The value which, once reached, will stop the automatic scrolling. Use -1 to specify no stop value
        Throws:
        java.lang.IllegalStateException - If automatic scrolling of any scroll bar is already in progress. Only one scroll bar may be automatically scrolled at one time
      • stop

        public void stop()
        Stops any automatic scrolling in progress.