org.apache.batik.parser

Class LengthArrayProducer

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 intcount
The total number of lengths accumulated.
protected shortcurrentUnit
The unit for the current length.
protected intindex
The index in which to store the next length.
protected short[]u
The current short[] object.
protected LinkedListus
List of short[] objects.
protected float[]v
The current float[] object.
protected LinkedListvs
List of float[] objects.
Method Summary
voidcm()
Implements cm.
voidem()
Implements em.
voidendLength()
Implements endLength.
voidendLengthList()
Invoked when the length list attribute ends.
voidex()
Implements ex.
short[]getLengthTypeArray()
Returns the array of length units accumulated.
float[]getLengthValueArray()
Returns the array of length values accumulated.
voidin()
Implements in.
voidlengthValue(float val)
Implements LengthHandler.
voidmm()
Implements mm.
voidnumberValue(float v)
Invoked when a float value has been parsed.
voidpc()
Implements pc.
voidpercentage()
Implements percentage.
voidpt()
Implements pt.
voidpx()
Implements px.
voidstartLength()
Implements startLength.
voidstartLengthList()
Invoked when the length list attribute starts.

Field Detail

count

protected int count
The total number of lengths accumulated.

currentUnit

protected short currentUnit
The unit for the current length.

index

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

u

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

us

protected LinkedList us
List of short[] objects.

v

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

vs

protected LinkedList vs
List of float[] objects.

Method Detail

cm

public void cm()
Implements cm.

em

public void em()
Implements em.

endLength

public void endLength()
Implements endLength.

endLengthList

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

Throws: ParseException if an error occures while processing the number list.

ex

public void ex()
Implements ex.

getLengthTypeArray

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

getLengthValueArray

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

in

public void in()
Implements in.

lengthValue

public void lengthValue(float val)
Implements LengthHandler.

mm

public void mm()
Implements mm.

numberValue

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

Throws: ParseException if an error occures while processing the number

pc

public void pc()
Implements pc.

percentage

public void percentage()
Implements percentage.

pt

public void pt()
Implements pt.

px

public void px()
Implements px.

startLength

public void startLength()
Implements startLength.

startLengthList

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

Throws: ParseException if an error occures while processing the number list.

Copyright B) 2008 Apache Software Foundation. All Rights Reserved.