com.sun.svg.component
Class SVGHorizontalScrollBar

java.lang.Object
  extended by com.sun.svg.component.SVGHorizontalScrollBar

public class SVGHorizontalScrollBar
extends java.lang.Object

The convention for a scroll bar is that the background element has the 'bkg' suffix (e.g., "myScrollBar.bkg") and the thumb element has the suffix 'thumb' (e.g., "myScrollBar.thumb").


Field Summary
(package private) static java.lang.String BACKGROUND_SUFFIX
           
protected  java.lang.String idPrefix
          The scroll bar's id prefix, i.e., the prefix used for all of the scrollbar component ids.
protected  float maxTranslate
          The max position of the thumb along the x-axis
protected  float minTranslate
          The min position of the thumb along the x-axis
protected  float pos
          The current scrollbar position.
protected  org.w3c.dom.svg.SVGSVGElement svg
          The document's root svg element.
protected  org.w3c.dom.svg.SVGLocatableElement thumb
          The scroll bar thumb
(package private) static java.lang.String THUMB_SUFFIX
           
protected  org.w3c.dom.svg.SVGMatrix thumbTxf
          The thumb's initial transform.
 
Constructor Summary
SVGHorizontalScrollBar(java.lang.String idPrefix)
           
 
Method Summary
 void hookSkin(org.w3c.dom.Document doc)
          Hooks this scroll bar with a new skin.
 void setThumbPosition(float pos)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BACKGROUND_SUFFIX

static final java.lang.String BACKGROUND_SUFFIX
See Also:
Constant Field Values

THUMB_SUFFIX

static final java.lang.String THUMB_SUFFIX
See Also:
Constant Field Values

thumb

protected org.w3c.dom.svg.SVGLocatableElement thumb
The scroll bar thumb


thumbTxf

protected org.w3c.dom.svg.SVGMatrix thumbTxf
The thumb's initial transform.


minTranslate

protected float minTranslate
The min position of the thumb along the x-axis


maxTranslate

protected float maxTranslate
The max position of the thumb along the x-axis


svg

protected org.w3c.dom.svg.SVGSVGElement svg
The document's root svg element.


idPrefix

protected java.lang.String idPrefix
The scroll bar's id prefix, i.e., the prefix used for all of the scrollbar component ids.


pos

protected float pos
The current scrollbar position.

Constructor Detail

SVGHorizontalScrollBar

public SVGHorizontalScrollBar(java.lang.String idPrefix)
Parameters:
idPrefix - the scrollBar id prefix.
Method Detail

hookSkin

public void hookSkin(org.w3c.dom.Document doc)
Hooks this scroll bar with a new skin.

Parameters:
doc - - the new skin content.

setThumbPosition

public void setThumbPosition(float pos)
Parameters:
pos - the desired thumb position in the [0, 1] interval. If the value is out of range, it is clipped to the valid range.