eu.webtoolkit.jwt
Class WScrollBar

java.lang.Object
  extended by eu.webtoolkit.jwt.WObject
      extended by 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 WScrollArea.ScrollBarPolicy.ScrollBarAlwaysOff). Using the tie() functions, it is possible to tie to scrollbars together, so that they will scroll together.

See Also:
WScrollArea

Method Summary
 Orientation getOrientation()
          Returns the orientation of this scrollbar.
 void setValue(int value)
          Sets the scrollbar value (in pixels).
static void tie(WScrollBar one, WScrollBar two)
          Ties two scrollbars together.
static void unTie(WScrollBar one, WScrollBar two)
          Unties two scrollbars, that were previously tied together.
 
Methods inherited from class eu.webtoolkit.jwt.WObject
addChild, getId, getObjectName, remove, setObjectName, tr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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.