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

public class SVGOMAngle extends Object implements org.w3c.dom.svg.SVGAngle
Implementation of an SVGAngle not associated with any attribute.
Version:
$Id: SVGOMAngle.java 1733416 2016-03-03 07:07:13Z gadams $
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static double[][]
    Table of multipliers for angle unit conversion.
    protected static final String[]
    The unit string representations.
    private short
    The type of this angle.
    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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    DOM: Implements SVGAngle.convertToSpecifiedUnits(short).
    short
    DOM: Implements SVGAngle.getUnitType().
    float
    DOM: Implements SVGAngle.getValue().
    DOM: Implements SVGAngle.getValueAsString().
    float
    DOM: Implements SVGAngle.getValueInSpecifiedUnits().
    void
    newValueSpecifiedUnits(short unit, float value)
    DOM: Implements SVGAngle.newValueSpecifiedUnits(short,float).
    protected void
    Parse a String value as an SVGAngle.
    protected void
    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: Implements SVGAngle.setValue(float).
    void
    DOM: Implements SVGAngle.setValueAsString(String).
    void
    DOM: Implements SVGAngle.setValueInSpecifiedUnits(float).
    static float
    toUnit(short fromUnit, float value, short toUnit)
    Converts an angle from one unit to another.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • unitType

      private short unitType
      The type of this angle.
    • value

      protected float value
      The value of this angle.
    • UNITS

      protected static final String[] UNITS
      The unit string representations.
    • K

      protected static double[][] K
      Table of multipliers for angle unit conversion.
  • Constructor Details

    • SVGOMAngle

      public SVGOMAngle()
  • Method Details

    • getUnitType

      public short getUnitType()
      DOM: Implements SVGAngle.getUnitType().
      Specified by:
      getUnitType in interface org.w3c.dom.svg.SVGAngle
    • getValue

      public float getValue()
      DOM: Implements SVGAngle.getValue().
      Specified by:
      getValue in interface org.w3c.dom.svg.SVGAngle
    • setValue

      public void setValue(float value) throws DOMException
      DOM: Implements SVGAngle.setValue(float).
      Specified by:
      setValue in interface org.w3c.dom.svg.SVGAngle
      Throws:
      DOMException
    • getValueInSpecifiedUnits

      public float getValueInSpecifiedUnits()
      DOM: Implements SVGAngle.getValueInSpecifiedUnits().
      Specified by:
      getValueInSpecifiedUnits in interface org.w3c.dom.svg.SVGAngle
    • setValueInSpecifiedUnits

      public void setValueInSpecifiedUnits(float value) throws DOMException
      DOM: Implements SVGAngle.setValueInSpecifiedUnits(float).
      Specified by:
      setValueInSpecifiedUnits in interface org.w3c.dom.svg.SVGAngle
      Throws:
      DOMException
    • getValueAsString

      public String getValueAsString()
      DOM: Implements SVGAngle.getValueAsString().
      Specified by:
      getValueAsString in interface org.w3c.dom.svg.SVGAngle
    • setValueAsString

      public void setValueAsString(String value) throws DOMException
      DOM: Implements SVGAngle.setValueAsString(String).
      Specified by:
      setValueAsString in interface org.w3c.dom.svg.SVGAngle
      Throws:
      DOMException
    • newValueSpecifiedUnits

      public void newValueSpecifiedUnits(short unit, float value)
      DOM: Implements SVGAngle.newValueSpecifiedUnits(short,float).
      Specified by:
      newValueSpecifiedUnits in interface org.w3c.dom.svg.SVGAngle
    • convertToSpecifiedUnits

      public void convertToSpecifiedUnits(short unit)
      DOM: Implements SVGAngle.convertToSpecifiedUnits(short).
      Specified by:
      convertToSpecifiedUnits in interface org.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

      protected void parse(String s)
      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)