Package snap.view

Class ScrollBar

All Implemented Interfaces:
PropChange.DoChange, XMLArchiver.Archivable

public class ScrollBar extends View
A ScrollBar for ScrollView.
  • Field Details

  • Constructor Details

    • ScrollBar

      public ScrollBar()
      Constructor.
  • Method Details

    • getScroll

      public double getScroll()
      Returns the offset into ContentSize.
    • setScroll

      public void setScroll(double aValue)
      Sets the offset into ContentSize.
    • getScrollMax

      public double getScrollMax()
      Returns the maximum value of scroll (scroll size - view size)
    • getScrollerSize

      public double getScrollerSize()
      Returns the size of the scroller showing content.
    • setScrollerSize

      public void setScrollerSize(double aValue)
      Sets the size of the scroller showing content.
    • getContentSize

      public double getContentSize()
      Returns the size of the content being scrolled.
    • setContentSize

      public void setContentSize(double aValue)
      Sets the size of the content being scrolled.
    • getScrollRatio

      public double getScrollRatio()
      Returns the ratio of current scroll to maximum scroll (0-1).
    • setScrollRatio

      public void setScrollRatio(double aValue)
      Sets the ratio of current scroll to maximum scroll (0-1).
    • getThumbBounds

      public Rect getThumbBounds()
      Returns the thumb rect.
    • processEvent

      protected void processEvent(ViewEvent anEvent)
      Handle events.
      Overrides:
      processEvent in class View
    • paintFront

      protected void paintFront(Painter aPntr)
      Paints the thumb.
      Overrides:
      paintFront in class View