Package org.apache.batik.parser
Class LengthArrayProducer
- java.lang.Object
-
- org.apache.batik.parser.DefaultLengthHandler
-
- org.apache.batik.parser.DefaultLengthListHandler
-
- 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.- Version:
- $Id: LengthArrayProducer.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Field Summary
Fields Modifier and Type Field Description protected intcountThe total number of lengths accumulated.protected shortcurrentUnitThe unit for the current length.protected intindexThe index in which to store the next length.protected short[]uThe currentshort[]object.protected java.util.LinkedListusList ofshort[]objects.protected float[]vThe currentfloat[]object.protected java.util.LinkedListvsList offloat[]objects.-
Fields inherited from class org.apache.batik.parser.DefaultLengthListHandler
INSTANCE
-
-
Constructor Summary
Constructors Constructor Description LengthArrayProducer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcm()ImplementsLengthHandler.cm().voidem()ImplementsLengthHandler.em().voidendLength()ImplementsLengthHandler.endLength().voidendLengthList()Invoked when the length list attribute ends.voidex()ImplementsLengthHandler.ex().short[]getLengthTypeArray()Returns the array of length units accumulated.float[]getLengthValueArray()Returns the array of length values accumulated.voidin()ImplementsLengthHandler.in().voidlengthValue(float val)ImplementsLengthHandler.lengthValue(float).voidmm()ImplementsLengthHandler.mm().voidnumberValue(float v)Invoked when a float value has been parsed.voidpc()ImplementsLengthHandler.pc().voidpercentage()ImplementsLengthHandler.percentage().voidpt()ImplementsLengthHandler.pt().voidpx()ImplementsLengthHandler.px().voidstartLength()ImplementsLengthHandler.startLength().voidstartLengthList()Invoked when the length list attribute starts.
-
-
-
Field Detail
-
vs
protected java.util.LinkedList vs
List offloat[]objects.
-
v
protected float[] v
The currentfloat[]object.
-
us
protected java.util.LinkedList us
List ofshort[]objects.
-
u
protected short[] u
The currentshort[]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.
-
-
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 ParseExceptionInvoked when the length list attribute starts.- Specified by:
startLengthListin interfaceLengthListHandler- Overrides:
startLengthListin classDefaultLengthListHandler- Throws:
ParseException- if an error occures while processing the number list.
-
numberValue
public void numberValue(float v) throws ParseExceptionInvoked when a float value has been parsed.- Throws:
ParseException- if an error occures while processing the number
-
lengthValue
public void lengthValue(float val) throws ParseExceptionImplementsLengthHandler.lengthValue(float).- Specified by:
lengthValuein interfaceLengthHandler- Overrides:
lengthValuein classDefaultLengthHandler- Throws:
ParseException- if an error occures while processing the length
-
startLength
public void startLength() throws ParseExceptionImplementsLengthHandler.startLength().- Specified by:
startLengthin interfaceLengthHandler- Overrides:
startLengthin classDefaultLengthHandler- Throws:
ParseException- if an error occures while processing the length
-
endLength
public void endLength() throws ParseExceptionImplementsLengthHandler.endLength().- Specified by:
endLengthin interfaceLengthHandler- Overrides:
endLengthin classDefaultLengthHandler- Throws:
ParseException- if an error occures while processing the length
-
em
public void em() throws ParseExceptionImplementsLengthHandler.em().- Specified by:
emin interfaceLengthHandler- Overrides:
emin classDefaultLengthHandler- Throws:
ParseException- if an error occures while processing the length
-
ex
public void ex() throws ParseExceptionImplementsLengthHandler.ex().- Specified by:
exin interfaceLengthHandler- Overrides:
exin classDefaultLengthHandler- Throws:
ParseException- if an error occures while processing the length
-
in
public void in() throws ParseExceptionImplementsLengthHandler.in().- Specified by:
inin interfaceLengthHandler- Overrides:
inin classDefaultLengthHandler- Throws:
ParseException- if an error occures while processing the length
-
cm
public void cm() throws ParseExceptionImplementsLengthHandler.cm().- Specified by:
cmin interfaceLengthHandler- Overrides:
cmin classDefaultLengthHandler- Throws:
ParseException- if an error occures while processing the length
-
mm
public void mm() throws ParseExceptionImplementsLengthHandler.mm().- Specified by:
mmin interfaceLengthHandler- Overrides:
mmin classDefaultLengthHandler- Throws:
ParseException- if an error occures while processing the length
-
pc
public void pc() throws ParseExceptionImplementsLengthHandler.pc().- Specified by:
pcin interfaceLengthHandler- Overrides:
pcin classDefaultLengthHandler- Throws:
ParseException- if an error occures while processing the length
-
pt
public void pt() throws ParseExceptionImplementsLengthHandler.pt().- Specified by:
ptin interfaceLengthHandler- Overrides:
ptin classDefaultLengthHandler- Throws:
ParseException- if an error occures while processing the length
-
px
public void px() throws ParseExceptionImplementsLengthHandler.px().- Specified by:
pxin interfaceLengthHandler- Overrides:
pxin classDefaultLengthHandler- Throws:
ParseException- if an error occures while processing the length
-
percentage
public void percentage() throws ParseExceptionImplementsLengthHandler.percentage().- Specified by:
percentagein interfaceLengthHandler- Overrides:
percentagein classDefaultLengthHandler- Throws:
ParseException- if an error occures while processing the length
-
endLengthList
public void endLengthList() throws ParseExceptionInvoked when the length list attribute ends.- Specified by:
endLengthListin interfaceLengthListHandler- Overrides:
endLengthListin classDefaultLengthListHandler- Throws:
ParseException- if an error occures while processing the number list.
-
-