org.apache.batik.dom.svg
Class SVGOMLength

java.lang.Object
  |
  +--org.apache.batik.dom.svg.SVGOMLength
All Implemented Interfaces:
LengthHandler, LiveAttributeValue, SVGLength

public class SVGOMLength
extends java.lang.Object
implements SVGLength, LiveAttributeValue, LengthHandler

This class implements SVGLength.


Field Summary
protected  AttributeModifier attributeModifier
          The associated attribute modifier.
protected  short direction
          This length direction.
protected static java.lang.String[] UNITS
          The units representations.
protected  short unitType
          The unit type.
protected  float valueInSpecifiedUnits
          The value in specified units.
 
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
SVGOMLength()
           
 
Method Summary
 void cm()
          Implements LengthHandler.cm().
 void convertToSpecifiedUnits(short unitType)
          DOM: Implements SVGLength.convertToSpecifiedUnits(short).
 void em()
          Implements LengthHandler.em().
 void endLength()
          Implements LengthHandler.endLength().
 void ex()
          Implements LengthHandler.ex().
 short getUnitType()
          DOM: Implements SVGLength.getUnitType().
 float getValue()
          DOM: Implements SVGLength.getValue().
 java.lang.String getValueAsString()
          DOM: Implements SVGLength.getValueAsString().
 float getValueInSpecifiedUnits()
          DOM: Implements SVGLength.getValueInSpecifiedUnits().
 void in()
          Implements LengthHandler.in().
 void lengthValue(float v)
          Implements LengthHandler.lengthValue(float).
 void mm()
          Implements LengthHandler.mm().
 void newValueSpecifiedUnits(short unitType, float valueInSpecifiedUnits)
          DOM: Implements SVGLength.newValueSpecifiedUnits(short, float).
protected  void parseLength(java.lang.String text)
          Parses the given length representation.
 void pc()
          Implements LengthHandler.pc().
 void percentage()
          Implements LengthHandler.percentage().
 void pt()
          Implements LengthHandler.pt().
 void px()
          Implements LengthHandler.px().
 void setAttributeModifier(AttributeModifier am)
          Sets the associated attribute modifier.
 void setDirection(short dir)
          Sets the length direction.
 void setValue(float value)
          DOM: Implements SVGLength.setValue(float).
 void setValueAsString(java.lang.String valueAsString)
          DOM: Implements SVGLength.setValueAsString(String).
 void setValueInSpecifiedUnits(float value)
          DOM: Implements SVGLength.setValueInSpecifiedUnits(float).
 void startLength()
          Implements LengthHandler.startLength().
 void valueChanged(Attr oldValue, Attr newValue)
          Called when the string representation of the value as been modified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNITS

protected static final java.lang.String[] UNITS
The units representations.

valueInSpecifiedUnits

protected float valueInSpecifiedUnits
The value in specified units.

unitType

protected short unitType
The unit type.

attributeModifier

protected AttributeModifier attributeModifier
The associated attribute modifier.

direction

protected short direction
This length direction.
Constructor Detail

SVGOMLength

public SVGOMLength()
Method Detail

setAttributeModifier

public void setAttributeModifier(AttributeModifier am)
Sets the associated attribute modifier.

setDirection

public void setDirection(short dir)
Sets the length direction.

valueChanged

public void valueChanged(Attr oldValue,
                         Attr newValue)
Called when the string representation of the value as been modified.
Specified by:
valueChanged in interface LiveAttributeValue
Parameters:
oldValue - The old Attr node.
newValue - The new Attr node.

getUnitType

public short getUnitType()
DOM: Implements SVGLength.getUnitType().
Specified by:
getUnitType in interface SVGLength

getValue

public float getValue()
DOM: Implements SVGLength.getValue().
Specified by:
getValue in interface SVGLength

setValue

public void setValue(float value)
              throws DOMException
DOM: Implements SVGLength.setValue(float).
Specified by:
setValue in interface SVGLength

getValueInSpecifiedUnits

public float getValueInSpecifiedUnits()
DOM: Implements SVGLength.getValueInSpecifiedUnits().
Specified by:
getValueInSpecifiedUnits in interface SVGLength

setValueInSpecifiedUnits

public void setValueInSpecifiedUnits(float value)
                              throws DOMException
DOM: Implements SVGLength.setValueInSpecifiedUnits(float).
Specified by:
setValueInSpecifiedUnits in interface SVGLength

getValueAsString

public java.lang.String getValueAsString()
DOM: Implements SVGLength.getValueAsString().
Specified by:
getValueAsString in interface SVGLength

setValueAsString

public void setValueAsString(java.lang.String valueAsString)
                      throws DOMException
DOM: Implements SVGLength.setValueAsString(String).
Specified by:
setValueAsString in interface SVGLength

newValueSpecifiedUnits

public void newValueSpecifiedUnits(short unitType,
                                   float valueInSpecifiedUnits)
DOM: Implements SVGLength.newValueSpecifiedUnits(short, float).
Specified by:
newValueSpecifiedUnits in interface SVGLength

convertToSpecifiedUnits

public void convertToSpecifiedUnits(short unitType)
DOM: Implements SVGLength.convertToSpecifiedUnits(short).
Specified by:
convertToSpecifiedUnits in interface SVGLength

parseLength

protected void parseLength(java.lang.String text)
Parses the given length representation.

startLength

public void startLength()
                 throws ParseException
Implements LengthHandler.startLength().
Specified by:
startLength in interface LengthHandler
Following copied from interface: org.apache.batik.parser.LengthHandler
Throws:
ParseException - if an error occures while processing the length

lengthValue

public void lengthValue(float v)
                 throws ParseException
Implements LengthHandler.lengthValue(float).
Specified by:
lengthValue in interface LengthHandler
Following copied from interface: org.apache.batik.parser.LengthHandler
Throws:
ParseException - if an error occures while processing the length

em

public void em()
        throws ParseException
Implements LengthHandler.em().
Specified by:
em in interface LengthHandler
Following copied from interface: org.apache.batik.parser.LengthHandler
Throws:
ParseException - if an error occures while processing the length

ex

public void ex()
        throws ParseException
Implements LengthHandler.ex().
Specified by:
ex in interface LengthHandler
Following copied from interface: org.apache.batik.parser.LengthHandler
Throws:
ParseException - if an error occures while processing the length

in

public void in()
        throws ParseException
Implements LengthHandler.in().
Specified by:
in in interface LengthHandler
Following copied from interface: org.apache.batik.parser.LengthHandler
Throws:
ParseException - if an error occures while processing the length

cm

public void cm()
        throws ParseException
Implements LengthHandler.cm().
Specified by:
cm in interface LengthHandler
Following copied from interface: org.apache.batik.parser.LengthHandler
Throws:
ParseException - if an error occures while processing the length

mm

public void mm()
        throws ParseException
Implements LengthHandler.mm().
Specified by:
mm in interface LengthHandler
Following copied from interface: org.apache.batik.parser.LengthHandler
Throws:
ParseException - if an error occures while processing the length

pc

public void pc()
        throws ParseException
Implements LengthHandler.pc().
Specified by:
pc in interface LengthHandler
Following copied from interface: org.apache.batik.parser.LengthHandler
Throws:
ParseException - if an error occures while processing the length

pt

public void pt()
        throws ParseException
Implements LengthHandler.pt().
Specified by:
pt in interface LengthHandler
Following copied from interface: org.apache.batik.parser.LengthHandler
Throws:
ParseException - if an error occures while processing the length

px

public void px()
        throws ParseException
Implements LengthHandler.px().
Specified by:
px in interface LengthHandler
Following copied from interface: org.apache.batik.parser.LengthHandler
Throws:
ParseException - if an error occures while processing the length

percentage

public void percentage()
                throws ParseException
Implements LengthHandler.percentage().
Specified by:
percentage in interface LengthHandler
Following copied from interface: org.apache.batik.parser.LengthHandler
Throws:
ParseException - if an error occures while processing the length

endLength

public void endLength()
               throws ParseException
Implements LengthHandler.endLength().
Specified by:
endLength in interface LengthHandler
Following copied from interface: org.apache.batik.parser.LengthHandler
Throws:
ParseException - if an error occures while processing the length


Copyright © 2000 Apache Software Foundation. All Rights Reserved.