com.sun.svg.component
Class SVGTextBinding

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

public class SVGTextBinding
extends java.lang.Object

Simple helper class to bind an SVG <text> element with a data source.


Field Summary
static java.lang.String DEFAULT_TEXT_VALUE
          The text binding's default value.
protected  java.lang.String id
          The id of the bound element.
protected  org.w3c.dom.svg.SVGElement text
          A reference to the bound element instance in the current skin.
 
Constructor Summary
SVGTextBinding(java.lang.String id)
           
 
Method Summary
 void hookSkin(org.w3c.dom.Document doc)
           
 void set(java.lang.String value)
          Sets the binding's value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TEXT_VALUE

public static final java.lang.String DEFAULT_TEXT_VALUE
The text binding's default value.

See Also:
Constant Field Values

id

protected java.lang.String id
The id of the bound element.


text

protected org.w3c.dom.svg.SVGElement text
A reference to the bound element instance in the current skin.

Constructor Detail

SVGTextBinding

public SVGTextBinding(java.lang.String id)
Parameters:
id - the <text> element in which the "#text" trait should be set.
Method Detail

hookSkin

public void hookSkin(org.w3c.dom.Document doc)
Parameters:
doc - - the Document skin where an element with this binding's id should be found.

set

public void set(java.lang.String value)
Sets the binding's value.

Parameters:
value - the new value to display in the text element.