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
A handler class that generates an array of shorts and an array floats from
parsing a length list.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
The total number of lengths accumulated.protected short
The unit for the current length.protected int
The index in which to store the next length.protected short[]
The currentshort[]
object.protected LinkedList
List ofshort[]
objects.protected float[]
The currentfloat[]
object.protected LinkedList
List offloat[]
objects.Fields inherited from class org.apache.batik.parser.DefaultLengthListHandler
INSTANCE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
cm()
ImplementsLengthHandler.cm()
.void
em()
ImplementsLengthHandler.em()
.void
ImplementsLengthHandler.endLength()
.void
Invoked when the length list attribute ends.void
ex()
ImplementsLengthHandler.ex()
.short[]
Returns the array of length units accumulated.float[]
Returns the array of length values accumulated.void
in()
ImplementsLengthHandler.in()
.void
lengthValue
(float val) ImplementsLengthHandler.lengthValue(float)
.void
mm()
ImplementsLengthHandler.mm()
.void
numberValue
(float v) Invoked when a float value has been parsed.void
pc()
ImplementsLengthHandler.pc()
.void
ImplementsLengthHandler.percentage()
.void
pt()
ImplementsLengthHandler.pt()
.void
px()
ImplementsLengthHandler.px()
.void
ImplementsLengthHandler.startLength()
.void
Invoked 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:
startLengthList
in interfaceLengthListHandler
- Overrides:
startLengthList
in 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:
lengthValue
in interfaceLengthHandler
- Overrides:
lengthValue
in classDefaultLengthHandler
- Throws:
ParseException
- if an error occures while processing the length
-
startLength
ImplementsLengthHandler.startLength()
.- Specified by:
startLength
in interfaceLengthHandler
- Overrides:
startLength
in classDefaultLengthHandler
- Throws:
ParseException
- if an error occures while processing the length
-
endLength
ImplementsLengthHandler.endLength()
.- Specified by:
endLength
in interfaceLengthHandler
- Overrides:
endLength
in classDefaultLengthHandler
- Throws:
ParseException
- if an error occures while processing the length
-
em
ImplementsLengthHandler.em()
.- Specified by:
em
in interfaceLengthHandler
- Overrides:
em
in classDefaultLengthHandler
- Throws:
ParseException
- if an error occures while processing the length
-
ex
ImplementsLengthHandler.ex()
.- Specified by:
ex
in interfaceLengthHandler
- Overrides:
ex
in classDefaultLengthHandler
- Throws:
ParseException
- if an error occures while processing the length
-
in
ImplementsLengthHandler.in()
.- Specified by:
in
in interfaceLengthHandler
- Overrides:
in
in classDefaultLengthHandler
- Throws:
ParseException
- if an error occures while processing the length
-
cm
ImplementsLengthHandler.cm()
.- Specified by:
cm
in interfaceLengthHandler
- Overrides:
cm
in classDefaultLengthHandler
- Throws:
ParseException
- if an error occures while processing the length
-
mm
ImplementsLengthHandler.mm()
.- Specified by:
mm
in interfaceLengthHandler
- Overrides:
mm
in classDefaultLengthHandler
- Throws:
ParseException
- if an error occures while processing the length
-
pc
ImplementsLengthHandler.pc()
.- Specified by:
pc
in interfaceLengthHandler
- Overrides:
pc
in classDefaultLengthHandler
- Throws:
ParseException
- if an error occures while processing the length
-
pt
ImplementsLengthHandler.pt()
.- Specified by:
pt
in interfaceLengthHandler
- Overrides:
pt
in classDefaultLengthHandler
- Throws:
ParseException
- if an error occures while processing the length
-
px
ImplementsLengthHandler.px()
.- Specified by:
px
in interfaceLengthHandler
- Overrides:
px
in classDefaultLengthHandler
- Throws:
ParseException
- if an error occures while processing the length
-
percentage
ImplementsLengthHandler.percentage()
.- Specified by:
percentage
in interfaceLengthHandler
- Overrides:
percentage
in classDefaultLengthHandler
- Throws:
ParseException
- if an error occures while processing the length
-
endLengthList
Invoked when the length list attribute ends.- Specified by:
endLengthList
in interfaceLengthListHandler
- Overrides:
endLengthList
in classDefaultLengthListHandler
- Throws:
ParseException
- if an error occures while processing the number list.
-