org.apache.batik.parser

Class FloatArrayProducer

public class FloatArrayProducer extends DefaultNumberListHandler implements PointsHandler

A handler class that generates an array of floats from parsing a number list or a point list.
Field Summary
protected float[]a
The current float[] object.
protected LinkedListas
List of float[] objects.
protected intcount
The total number of floats accumulated.
protected intindex
The index in which to store the next number.
Method Summary
voidendNumberList()
Invoked when the number list attribute ends.
voidendPoints()
Implements {@link PointsHandler#endPoints()}.
float[]getFloatArray()
Returns the array of floats accumulated.
voidnumberValue(float v)
Invoked when a float value has been parsed.
voidpoint(float x, float y)
Implements {@link PointsHandler#point(float,float)}.
voidstartNumberList()
Invoked when the number list attribute starts.
voidstartPoints()
Implements {@link PointsHandler#startPoints()}.

Field Detail

a

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

as

protected LinkedList as
List of float[] objects.

count

protected int count
The total number of floats accumulated.

index

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

Method Detail

endNumberList

public void endNumberList()
Invoked when the number list attribute ends.

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

endPoints

public void endPoints()
Implements {@link PointsHandler#endPoints()}.

getFloatArray

public float[] getFloatArray()
Returns the array of floats accumulated.

numberValue

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

Throws: ParseException if an error occures while processing the number

point

public void point(float x, float y)
Implements {@link PointsHandler#point(float,float)}.

startNumberList

public void startNumberList()
Invoked when the number list attribute starts.

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

startPoints

public void startPoints()
Implements {@link PointsHandler#startPoints()}.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.