|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.batik.dom.svg.AbstractSVGLength
public abstract class AbstractSVGLength
Default implementation for SVGLength.
This implementation provides the basic
functionalities of SVGLength. To have
a complete implementation, an element is
required to resolve the units.
According to the usage of this AbstractSVGLength,
the 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 static String[] |
UNITS
The unit string representations. |
protected short |
unitType
The type of this length. |
protected float |
value
The value of this length. |
static short |
VERTICAL_LENGTH
This constant represents vertical lengths. |
Fields inherited from interface org.w3c.dom.svg.SVGLength |
---|
SVG_LENGTHTYPE_CM, SVG_LENGTHTYPE_EMS, SVG_LENGTHTYPE_EXS, SVG_LENGTHTYPE_IN, SVG_LENGTHTYPE_MM, SVG_LENGTHTYPE_NUMBER, SVG_LENGTHTYPE_PC, SVG_LENGTHTYPE_PERCENTAGE, SVG_LENGTHTYPE_PT, SVG_LENGTHTYPE_PX, SVG_LENGTHTYPE_UNKNOWN |
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) . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final short HORIZONTAL_LENGTH
public static final short VERTICAL_LENGTH
public static final short OTHER_LENGTH
protected short unitType
protected float value
protected short direction
protected UnitProcessor.Context context
protected static final String[] UNITS
Constructor Detail |
---|
public AbstractSVGLength(short direction)
Method Detail |
---|
protected abstract SVGOMElement getAssociatedElement()
public short getUnitType()
SVGLength.getUnitType()
.
getUnitType
in interface org.w3c.dom.svg.SVGLength
public float getValue()
SVGLength.getValue()
.
getValue
in interface org.w3c.dom.svg.SVGLength
public void setValue(float value) throws DOMException
SVGLength.setValue(float)
.
setValue
in interface org.w3c.dom.svg.SVGLength
DOMException
public float getValueInSpecifiedUnits()
SVGLength.getValueInSpecifiedUnits()
.
getValueInSpecifiedUnits
in interface org.w3c.dom.svg.SVGLength
public void setValueInSpecifiedUnits(float value) throws DOMException
SVGLength.setValueInSpecifiedUnits(float)
.
setValueInSpecifiedUnits
in interface org.w3c.dom.svg.SVGLength
DOMException
public String getValueAsString()
SVGLength.getValueAsString()
.
getValueAsString
in interface org.w3c.dom.svg.SVGLength
public void setValueAsString(String value) throws DOMException
SVGLength.setValueAsString(String)
.
setValueAsString
in interface org.w3c.dom.svg.SVGLength
DOMException
public void newValueSpecifiedUnits(short unit, float value)
SVGLength.newValueSpecifiedUnits(short,float)
.
newValueSpecifiedUnits
in interface org.w3c.dom.svg.SVGLength
public void convertToSpecifiedUnits(short unit)
SVGLength.convertToSpecifiedUnits(short)
.
convertToSpecifiedUnits
in interface org.w3c.dom.svg.SVGLength
protected void reset()
protected void revalidate()
protected void parse(String s)
s
- String representation of a SVGlength.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |