org.apache.batik.parser
Class LengthArrayProducer

java.lang.Object
  extended by org.apache.batik.parser.DefaultLengthHandler
      extended by org.apache.batik.parser.DefaultLengthListHandler
          extended by org.apache.batik.parser.LengthArrayProducer
All Implemented Interfaces:
LengthHandler, LengthListHandler

public class LengthArrayProducer
extends DefaultLengthListHandler

A handler class that generates an array of shorts and an array floats from parsing a length list.


Field Summary
protected  int count
          The total number of lengths accumulated.
protected  short currentUnit
          The unit for the current length.
protected  int index
          The index in which to store the next length.
protected  short[] u
          The current short[] object.
protected  LinkedList us
          List of short[] objects.
protected  float[] v
          The current float[] object.
protected  LinkedList vs
          List of float[] objects.
 
Fields inherited from class org.apache.batik.parser.DefaultLengthListHandler
INSTANCE
 
Constructor Summary
LengthArrayProducer()
           
 
Method Summary
 void cm()
          Implements LengthHandler.cm().
 void em()
          Implements LengthHandler.em().
 void endLength()
          Implements LengthHandler.endLength().
 void endLengthList()
          Invoked when the length list attribute ends.
 void ex()
          Implements LengthHandler.ex().
 short[] getLengthTypeArray()
          Returns the array of length units accumulated.
 float[] getLengthValueArray()
          Returns the array of length values accumulated.
 void in()
          Implements LengthHandler.in().
 void lengthValue(float val)
          Implements LengthHandler.lengthValue(float).
 void mm()
          Implements LengthHandler.mm().
 void numberValue(float v)
          Invoked when a float value has been parsed.
 void pc()
          Implements LengthHandler.pc().
 void percentage()
          Implements LengthHandler.percentage().
 void pt()
          Implements LengthHandler.pt().
 void px()
          Implements LengthHandler.px().
 void startLength()
          Implements LengthHandler.startLength().
 void startLengthList()
          Invoked when the length list attribute starts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vs

protected LinkedList vs
List of float[] objects.


v

protected float[] v
The current float[] object.


us

protected LinkedList us
List of short[] objects.


u

protected short[] u
The current short[] object.


index

protected int index
The index in which to store the next length.


count

protected int count
The total number of lengths accumulated.


currentUnit

protected short currentUnit
The unit for the current length.

Constructor Detail

LengthArrayProducer

public LengthArrayProducer()
Method Detail

getLengthTypeArray

public short[] getLengthTypeArray()
Returns the array of length units accumulated.


getLengthValueArray

public float[] getLengthValueArray()
Returns the array of length values accumulated.


startLengthList

public void startLengthList()
                     throws ParseException
Invoked when the length list attribute starts.

Specified by:
startLengthList in interface LengthListHandler
Overrides:
startLengthList in class DefaultLengthListHandler
Throws:
ParseException - if an error occures while processing the number list.

numberValue

public void numberValue(float v)
                 throws ParseException
Invoked when a float value has been parsed.

Throws:
ParseException - if an error occures while processing the number

lengthValue

public void lengthValue(float val)
                 throws ParseException
Implements LengthHandler.lengthValue(float).

Specified by:
lengthValue in interface LengthHandler
Overrides:
lengthValue in class DefaultLengthHandler
Throws:
ParseException - if an error occures while processing the length

startLength

public void startLength()
                 throws ParseException
Implements LengthHandler.startLength().

Specified by:
startLength in interface LengthHandler
Overrides:
startLength in class DefaultLengthHandler
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
Overrides:
endLength in class DefaultLengthHandler
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
Overrides:
em in class DefaultLengthHandler
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
Overrides:
ex in class DefaultLengthHandler
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
Overrides:
in in class DefaultLengthHandler
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
Overrides:
cm in class DefaultLengthHandler
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
Overrides:
mm in class DefaultLengthHandler
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
Overrides:
pc in class DefaultLengthHandler
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
Overrides:
pt in class DefaultLengthHandler
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
Overrides:
px in class DefaultLengthHandler
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
Overrides:
percentage in class DefaultLengthHandler
Throws:
ParseException - if an error occures while processing the length

endLengthList

public void endLengthList()
                   throws ParseException
Invoked when the length list attribute ends.

Specified by:
endLengthList in interface LengthListHandler
Overrides:
endLengthList in class DefaultLengthListHandler
Throws:
ParseException - if an error occures while processing the number list.


Copyright © 2008 Apache Software Foundation. All Rights Reserved.