Package com.luciad.format.svg
Interface ILcdSVGShapeFactory
- All Known Implementing Classes:
TLcdSVGUnStyledLonLatShapeFactory
,TLcdSVGUnStyledXYShapeFactory
public interface ILcdSVGShapeFactory
This interface represents a factory for
ILcdShape
used in the TLcdSVGContentHandler
. It must be set to the TLcdSVGSAXModelDecoder
. It can create an element from an Attributes.
ILcdShapeList
is a special case. First the factory is asked to create an empty one.
The handler will ask the factory to create the actual ILcdShapeList
from the created
one (with properties) and the shapes that have been collected int the meantime.
The problem is that when the new instance of the ILcdShapeList
must be created,
all the elements in it are not known,but the instance must be created
in order to preserve the properties.
To extend this class, unsupported ILcdShape
can be added by overwriting the createUnknownShape
to create the shape and setUnknownShapeText
to add a text to the shape.-
Method Summary
Modifier and TypeMethodDescriptioncreateArcBand
(Attributes aAttributes) Creates aILcdArcBand
form givenAttributes
.createBounds
(Attributes aAttributes) Creates nILcdBounds
form givenAttributes
.createCircle
(Attributes aAttributes) Creates anILcdCircle
form givenAttributes
.createEllipse
(Attributes aAttributes) Creates aILcdEllipse
form givenAttributes
.createEmptyShapeList
(Attributes aAttributes) Creates an emptyILcdShapeList
form givenAttributes
.createLine
(Attributes aAttributes) Creates anILcdPolyline
form givenAttributes
.createPath
(Attributes aAttributes) Creates anILcdShape
from givenAttributes
.createPoint
(Attributes aAttributes) Creates aILcdPoint
form givenAttributes
.createPolygon
(Attributes aAttributes) Creates anILcdPolygon
form givenAttributes
.createPolyline
(Attributes aAttributes) Creates anILcdPolyline
form givenAttributes
.createShapeList
(ILcdShapeList aShapeList, ILcdShape[] aShapeArray) Creates anILcdShapeList
based on an existingILcdShapeList
and anArray
ofILcdShape
.createText
(Attributes aAttributes) Creates anILcdText
form givenAttributes
.createUnknownShape
(Attributes aAttributes, String aLocalName) creates an unknownILcdShape
of type aLocalname.void
This method is called by the TLcdSVGContentHandler when an unknown element was handled, regardless of whether or not this created a shape.void
Sets aString
as the text of anILcdText
.void
setUnknownShapeText
(Object aObject, String aText) Sets aString
as text to the unknown shape.
-
Method Details
-
createCircle
Creates anILcdCircle
form givenAttributes
.- Parameters:
aAttributes
- theAttributes
containing the info to create the object.- Returns:
- the created
ILcdCirlce
.
-
createPolyline
Creates anILcdPolyline
form givenAttributes
.- Parameters:
aAttributes
- theAttributes
containing the info to create the object.- Returns:
- the created
ILcdCirlce
.
-
createLine
Creates anILcdPolyline
form givenAttributes
. A Line is a Polyline with only 2 points.- Parameters:
aAttributes
- theAttributes
containing the info to create the object.- Returns:
- the created
ILcdCirlce
.
-
createPolygon
Creates anILcdPolygon
form givenAttributes
.- Parameters:
aAttributes
- theAttributes
containing the info to create the object.- Returns:
- the created
ILcdPolygon
.
-
createPath
Creates anILcdShape
from givenAttributes
. This shape can be aILcdPolyline
or aILcdPolygon
, depending on whether the path is closed or not, or aILcdShapeList
containingILcdPolyline
objects and/orILcdPolygon
objects.- Parameters:
aAttributes
- theAttributes
containing the info to create the object.- Returns:
- the created
ILcdShape
.
-
createBounds
Creates nILcdBounds
form givenAttributes
.- Parameters:
aAttributes
- theAttributes
containing the info to create the object.- Returns:
- the created
ILcdBounds
.
-
createText
Creates anILcdText
form givenAttributes
.- Parameters:
aAttributes
- theAttributes
containing the info to create the object.- Returns:
- the created
ILcdText
.
-
createEmptyShapeList
Creates an emptyILcdShapeList
form givenAttributes
.- Parameters:
aAttributes
- theAttributes
containing the info to create the object.- Returns:
- the created
ILcdShapeList
.
-
createShapeList
Creates anILcdShapeList
based on an existingILcdShapeList
and anArray
ofILcdShape
.- Parameters:
aShapeList
- theILcdShapeList
.aShapeArray
- theArray
ofILcdShape
to fill the object.- Returns:
- the created
ILcdShapeList
.
-
createPoint
Creates aILcdPoint
form givenAttributes
. This is a non - true - svg object!- Parameters:
aAttributes
- theAttributes
containing the info to create the object.- Returns:
- the created
ILcdPoint
.
-
createEllipse
Creates aILcdEllipse
form givenAttributes
. This is a non - true - svg object!- Parameters:
aAttributes
- theAttributes
containing the info to create the object.- Returns:
- the created
ILcdEllipse
.
-
createArcBand
Creates aILcdArcBand
form givenAttributes
. This is a non - true - svg object !- Parameters:
aAttributes
- theAttributes
containing the info to create the object.- Returns:
- the created
ILcdArcBand
.
-
setText
Sets aString
as the text of anILcdText
.- Parameters:
aTextObject
- aILcdText
.aText
- aString
.
-
createUnknownShape
creates an unknownILcdShape
of type aLocalname.- Parameters:
aAttributes
- the attributes to create the unknown shape.aLocalName
- the type of the unknown shape, the name of the xml element.- Returns:
- the created
ILcdShape
-
endUnknownShape
void endUnknownShape()This method is called by the TLcdSVGContentHandler when an unknown element was handled, regardless of whether or not this created a shape. -
setUnknownShapeText
Sets aString
as text to the unknown shape. The text is the character data between the begin and end tag of the unknown shape.- Parameters:
aObject
- aObject
, the unknown shape.aText
- aString
, the text to set to the unknown shape.
-