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 {@link LengthHandler#cm()}.
voidem()
Implements {@link LengthHandler#em()}.
voidendLength()
Implements {@link LengthHandler#endLength()}.
voidendLengthList()
Invoked when the length list attribute ends.
voidex()
Implements {@link LengthHandler#ex()}.
short[]getLengthTypeArray()
Returns the array of length units accumulated.
float[]getLengthValueArray()
Returns the array of length values accumulated.
voidin()
Implements {@link LengthHandler#in()}.
voidlengthValue(float val)
Implements {@link LengthHandler#lengthValue(float)}.
voidmm()
Implements {@link LengthHandler#mm()}.
voidnumberValue(float v)
Invoked when a float value has been parsed.
voidpc()
Implements {@link LengthHandler#pc()}.
voidpercentage()
Implements {@link LengthHandler#percentage()}.
voidpt()
Implements {@link LengthHandler#pt()}.
voidpx()
Implements {@link LengthHandler#px()}.
voidstartLength()
Implements {@link LengthHandler#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 {@link LengthHandler#cm()}.

em

public void em()
Implements {@link LengthHandler#em()}.

endLength

public void endLength()
Implements {@link LengthHandler#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 {@link LengthHandler#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 {@link LengthHandler#in()}.

lengthValue

public void lengthValue(float val)
Implements {@link LengthHandler#lengthValue(float)}.

mm

public void mm()
Implements {@link LengthHandler#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 {@link LengthHandler#pc()}.

percentage

public void percentage()
Implements {@link LengthHandler#percentage()}.

pt

public void pt()
Implements {@link LengthHandler#pt()}.

px

public void px()
Implements {@link LengthHandler#px()}.

startLength

public void startLength()
Implements {@link LengthHandler#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) 2007 Apache Software Foundation. All Rights Reserved.