Package org.apache.batik.dom.svg
Class SVGOMAngle
java.lang.Object
org.apache.batik.dom.svg.SVGOMAngle
- All Implemented Interfaces:
org.w3c.dom.svg.SVGAngle
- Direct Known Subclasses:
SVGOMAnimatedMarkerOrientValue.AnimSVGAngle
,SVGOMAnimatedMarkerOrientValue.BaseSVGAngle
Implementation of an
SVGAngle
not associated with any attribute.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static double[][]
Table of multipliers for angle unit conversion.protected static final String[]
The unit string representations.protected float
The value of this angle.Fields inherited from interface org.w3c.dom.svg.SVGAngle
SVG_ANGLETYPE_DEG, SVG_ANGLETYPE_GRAD, SVG_ANGLETYPE_RAD, SVG_ANGLETYPE_UNKNOWN, SVG_ANGLETYPE_UNSPECIFIED
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
convertToSpecifiedUnits
(short unit) DOM: ImplementsSVGAngle.convertToSpecifiedUnits(short)
.short
DOM: ImplementsSVGAngle.getUnitType()
.float
getValue()
DOM: ImplementsSVGAngle.getValue()
.DOM: ImplementsSVGAngle.getValueAsString()
.float
DOM: ImplementsSVGAngle.getValueInSpecifiedUnits()
.void
newValueSpecifiedUnits
(short unit, float value) DOM: ImplementsSVGAngle.newValueSpecifiedUnits(short,float)
.protected void
Parse a String value as an SVGAngle.protected void
reset()
Resets the associated attribute value according to the current value.protected void
Updates the values in this object according to the associated attribute value.void
setUnitType
(short unitType) void
setValue
(float value) DOM: ImplementsSVGAngle.setValue(float)
.void
setValueAsString
(String value) DOM: ImplementsSVGAngle.setValueAsString(String)
.void
setValueInSpecifiedUnits
(float value) DOM: ImplementsSVGAngle.setValueInSpecifiedUnits(float)
.static float
toUnit
(short fromUnit, float value, short toUnit) Converts an angle from one unit to another.
-
Field Details
-
value
protected float valueThe value of this angle. -
UNITS
The unit string representations. -
K
protected static double[][] KTable of multipliers for angle unit conversion.
-
-
Constructor Details
-
SVGOMAngle
public SVGOMAngle()
-
-
Method Details
-
getUnitType
public short getUnitType()DOM: ImplementsSVGAngle.getUnitType()
.- Specified by:
getUnitType
in interfaceorg.w3c.dom.svg.SVGAngle
-
getValue
public float getValue()DOM: ImplementsSVGAngle.getValue()
.- Specified by:
getValue
in interfaceorg.w3c.dom.svg.SVGAngle
-
setValue
DOM: ImplementsSVGAngle.setValue(float)
.- Specified by:
setValue
in interfaceorg.w3c.dom.svg.SVGAngle
- Throws:
DOMException
-
getValueInSpecifiedUnits
public float getValueInSpecifiedUnits()DOM: ImplementsSVGAngle.getValueInSpecifiedUnits()
.- Specified by:
getValueInSpecifiedUnits
in interfaceorg.w3c.dom.svg.SVGAngle
-
setValueInSpecifiedUnits
DOM: ImplementsSVGAngle.setValueInSpecifiedUnits(float)
.- Specified by:
setValueInSpecifiedUnits
in interfaceorg.w3c.dom.svg.SVGAngle
- Throws:
DOMException
-
getValueAsString
DOM: ImplementsSVGAngle.getValueAsString()
.- Specified by:
getValueAsString
in interfaceorg.w3c.dom.svg.SVGAngle
-
setValueAsString
DOM: ImplementsSVGAngle.setValueAsString(String)
.- Specified by:
setValueAsString
in interfaceorg.w3c.dom.svg.SVGAngle
- Throws:
DOMException
-
newValueSpecifiedUnits
public void newValueSpecifiedUnits(short unit, float value) DOM: ImplementsSVGAngle.newValueSpecifiedUnits(short,float)
.- Specified by:
newValueSpecifiedUnits
in interfaceorg.w3c.dom.svg.SVGAngle
-
convertToSpecifiedUnits
public void convertToSpecifiedUnits(short unit) DOM: ImplementsSVGAngle.convertToSpecifiedUnits(short)
.- Specified by:
convertToSpecifiedUnits
in interfaceorg.w3c.dom.svg.SVGAngle
-
reset
protected void reset()Resets the associated attribute value according to the current value. This should be overridden in descendant classes that associate the angle object with an attribute. -
revalidate
protected void revalidate()Updates the values in this object according to the associated attribute value. This should be overridden in descendant classes that associate the angle object with an attribute. -
parse
Parse a String value as an SVGAngle. -
toUnit
public static float toUnit(short fromUnit, float value, short toUnit) Converts an angle from one unit to another. -
setUnitType
public void setUnitType(short unitType)
-