org.apache.batik.dom.svg
public abstract class AbstractSVGLength extends Object implements SVGLength
reset()
method is after
changes being made to the unitType or the value
of this length. Before any values are return
to the user of the AbstractSVGLength, the
revalidate()
method is being called
to insure the validity of the value and unit type
held by this object.
Nested Class Summary | |
---|---|
protected class | AbstractSVGLength.DefaultContext
To resolve the units. |
Field Summary | |
---|---|
protected UnitProcessor.Context | context
The context used to resolve the units. |
protected short | direction
This length's direction. |
static short | HORIZONTAL_LENGTH
This constant represents horizontal lengths. |
static short | OTHER_LENGTH
This constant represents other lengths. |
protected short | unitType
The type of this length. |
protected static String[] | UNITS
The unit string representations. |
protected float | value
The value of this length. |
static short | VERTICAL_LENGTH
This constant represents vertical lengths. |
Constructor Summary | |
---|---|
AbstractSVGLength(short direction)
Creates a new AbstractSVGLength. |
Method Summary | |
---|---|
void | convertToSpecifiedUnits(short unit)
DOM: Implements SVGLength#convertToSpecifiedUnits(short). |
protected abstract SVGOMElement | getAssociatedElement()
Return the SVGElement associated to this length. |
short | getUnitType()
DOM: Implements SVGLength#getUnitType(). |
float | getValue()
DOM: Implements SVGLength#getValue(). |
String | getValueAsString()
DOM: Implements SVGLength#getValueAsString(). |
float | getValueInSpecifiedUnits()
DOM: Implements SVGLength#getValueInSpecifiedUnits(). |
void | newValueSpecifiedUnits(short unit, float value)
DOM: Implements SVGLength#newValueSpecifiedUnits(short,float). |
protected void | parse(String s)
Parse a String value as a SVGLength.
|
protected void | reset()
Callback method after changes
made to this length.
|
protected void | revalidate()
Callback method before any value
is return from this length.
|
void | setValue(float value)
DOM: Implements SVGLength#setValue(float). |
void | setValueAsString(String value)
DOM: Implements SVGLength#setValueAsString(String). |
void | setValueInSpecifiedUnits(float value)
DOM: Implements SVGLength#setValueInSpecifiedUnits(float). |
Parameters: s String representation of a SVGlength.