Class WScrollBar

java.lang.Object
eu.webtoolkit.jwt.WObject
eu.webtoolkit.jwt.WScrollBar

public class WScrollBar
extends WObject
A scrollbar attached to a scroll area.

A WScrollArea always has two scrollbars (even if they are not visible, for example when the policy is ScrollBarPolicy#ScrollBarAlwaysOff). Using the tie() functions, it is possible to tie two scrollbars together, so that they will scroll together.

See Also:
WScrollArea
  • Method Details

    • getOrientation

      public Orientation getOrientation()
      Returns the orientation of this scrollbar.
    • tie

      public static void tie​(WScrollBar one, WScrollBar two)
      Ties two scrollbars together.

      The effect of this call is that these scrollbars will keep their positions synchronised.

    • unTie

      public static void unTie​(WScrollBar one, WScrollBar two)
      Unties two scrollbars, that were previously tied together.

      Undo a tie();

    • setValue

      public void setValue​(int value)
      Sets the scrollbar value (in pixels).

      This will move the scrollbar to the given value.