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
A handler class that generates an array of shorts and an array floats from
parsing a length list.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe total number of lengths accumulated.protected shortThe unit for the current length.protected intThe index in which to store the next length.protected short[]The currentshort[]object.protected LinkedListList ofshort[]objects.protected float[]The currentfloat[]object.protected LinkedListList offloat[]objects.Fields inherited from class DefaultLengthListHandler
INSTANCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcm()ImplementsLengthHandler.cm().voidem()ImplementsLengthHandler.em().voidImplementsLengthHandler.endLength().voidInvoked when the length list attribute ends.voidex()ImplementsLengthHandler.ex().short[]Returns the array of length units accumulated.float[]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().voidImplementsLengthHandler.percentage().voidpt()ImplementsLengthHandler.pt().voidpx()ImplementsLengthHandler.px().voidImplementsLengthHandler.startLength().voidInvoked when the length list attribute starts.
-
Field Details
-
vs
List offloat[]objects. -
v
protected float[] vThe currentfloat[]object. -
us
List ofshort[]objects. -
u
protected short[] uThe currentshort[]object. -
index
protected int indexThe index in which to store the next length. -
count
protected int countThe total number of lengths accumulated. -
currentUnit
protected short currentUnitThe unit for the current length.
-
-
Constructor Details
-
LengthArrayProducer
public LengthArrayProducer()
-
-
Method Details
-
getLengthTypeArray
public short[] getLengthTypeArray()Returns the array of length units accumulated. -
getLengthValueArray
public float[] getLengthValueArray()Returns the array of length values accumulated. -
startLengthList
Invoked 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
Invoked when a float value has been parsed.- Throws:
ParseException- if an error occures while processing the number
-
lengthValue
ImplementsLengthHandler.lengthValue(float).- Specified by:
lengthValuein interfaceLengthHandler- Overrides:
lengthValuein classDefaultLengthHandler- Throws:
ParseException- if an error occures while processing the length
-
startLength
ImplementsLengthHandler.startLength().- Specified by:
startLengthin interfaceLengthHandler- Overrides:
startLengthin classDefaultLengthHandler- Throws:
ParseException- if an error occures while processing the length
-
endLength
ImplementsLengthHandler.endLength().- Specified by:
endLengthin interfaceLengthHandler- Overrides:
endLengthin classDefaultLengthHandler- Throws:
ParseException- if an error occures while processing the length
-
em
ImplementsLengthHandler.em().- Specified by:
emin interfaceLengthHandler- Overrides:
emin classDefaultLengthHandler- Throws:
ParseException- if an error occures while processing the length
-
ex
ImplementsLengthHandler.ex().- Specified by:
exin interfaceLengthHandler- Overrides:
exin classDefaultLengthHandler- Throws:
ParseException- if an error occures while processing the length
-
in
ImplementsLengthHandler.in().- Specified by:
inin interfaceLengthHandler- Overrides:
inin classDefaultLengthHandler- Throws:
ParseException- if an error occures while processing the length
-
cm
ImplementsLengthHandler.cm().- Specified by:
cmin interfaceLengthHandler- Overrides:
cmin classDefaultLengthHandler- Throws:
ParseException- if an error occures while processing the length
-
mm
ImplementsLengthHandler.mm().- Specified by:
mmin interfaceLengthHandler- Overrides:
mmin classDefaultLengthHandler- Throws:
ParseException- if an error occures while processing the length
-
pc
ImplementsLengthHandler.pc().- Specified by:
pcin interfaceLengthHandler- Overrides:
pcin classDefaultLengthHandler- Throws:
ParseException- if an error occures while processing the length
-
pt
ImplementsLengthHandler.pt().- Specified by:
ptin interfaceLengthHandler- Overrides:
ptin classDefaultLengthHandler- Throws:
ParseException- if an error occures while processing the length
-
px
ImplementsLengthHandler.px().- Specified by:
pxin interfaceLengthHandler- Overrides:
pxin classDefaultLengthHandler- Throws:
ParseException- if an error occures while processing the length
-
percentage
ImplementsLengthHandler.percentage().- Specified by:
percentagein interfaceLengthHandler- Overrides:
percentagein classDefaultLengthHandler- Throws:
ParseException- if an error occures while processing the length
-
endLengthList
Invoked when the length list attribute ends.- Specified by:
endLengthListin interfaceLengthListHandler- Overrides:
endLengthListin classDefaultLengthListHandler- Throws:
ParseException- if an error occures while processing the number list.
-