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 aILcdArcBandform givenAttributes.createBounds(Attributes aAttributes) Creates nILcdBoundsform givenAttributes.createCircle(Attributes aAttributes) Creates anILcdCircleform givenAttributes.createEllipse(Attributes aAttributes) Creates aILcdEllipseform givenAttributes.createEmptyShapeList(Attributes aAttributes) Creates an emptyILcdShapeListform givenAttributes.createLine(Attributes aAttributes) Creates anILcdPolylineform givenAttributes.createPath(Attributes aAttributes) Creates anILcdShapefrom givenAttributes.createPoint(Attributes aAttributes) Creates aILcdPointform givenAttributes.createPolygon(Attributes aAttributes) Creates anILcdPolygonform givenAttributes.createPolyline(Attributes aAttributes) Creates anILcdPolylineform givenAttributes.createShapeList(ILcdShapeList aShapeList, ILcdShape[] aShapeArray) Creates anILcdShapeListbased on an existingILcdShapeListand anArrayofILcdShape.createText(Attributes aAttributes) Creates anILcdTextform givenAttributes.createUnknownShape(Attributes aAttributes, String aLocalName) creates an unknownILcdShapeof type aLocalname.voidThis method is called by the TLcdSVGContentHandler when an unknown element was handled, regardless of whether or not this created a shape.voidSets aStringas the text of anILcdText.voidsetUnknownShapeText(Object aObject, String aText) Sets aStringas text to the unknown shape.
-
Method Details
-
createCircle
Creates anILcdCircleform givenAttributes.- Parameters:
aAttributes- theAttributescontaining the info to create the object.- Returns:
- the created
ILcdCirlce.
-
createPolyline
Creates anILcdPolylineform givenAttributes.- Parameters:
aAttributes- theAttributescontaining the info to create the object.- Returns:
- the created
ILcdCirlce.
-
createLine
Creates anILcdPolylineform givenAttributes. A Line is a Polyline with only 2 points.- Parameters:
aAttributes- theAttributescontaining the info to create the object.- Returns:
- the created
ILcdCirlce.
-
createPolygon
Creates anILcdPolygonform givenAttributes.- Parameters:
aAttributes- theAttributescontaining the info to create the object.- Returns:
- the created
ILcdPolygon.
-
createPath
Creates anILcdShapefrom givenAttributes. This shape can be aILcdPolylineor aILcdPolygon, depending on whether the path is closed or not, or aILcdShapeListcontainingILcdPolylineobjects and/orILcdPolygonobjects.- Parameters:
aAttributes- theAttributescontaining the info to create the object.- Returns:
- the created
ILcdShape.
-
createBounds
Creates nILcdBoundsform givenAttributes.- Parameters:
aAttributes- theAttributescontaining the info to create the object.- Returns:
- the created
ILcdBounds.
-
createText
Creates anILcdTextform givenAttributes.- Parameters:
aAttributes- theAttributescontaining the info to create the object.- Returns:
- the created
ILcdText.
-
createEmptyShapeList
Creates an emptyILcdShapeListform givenAttributes.- Parameters:
aAttributes- theAttributescontaining the info to create the object.- Returns:
- the created
ILcdShapeList.
-
createShapeList
Creates anILcdShapeListbased on an existingILcdShapeListand anArrayofILcdShape.- Parameters:
aShapeList- theILcdShapeList.aShapeArray- theArrayofILcdShapeto fill the object.- Returns:
- the created
ILcdShapeList.
-
createPoint
Creates aILcdPointform givenAttributes. This is a non - true - svg object!- Parameters:
aAttributes- theAttributescontaining the info to create the object.- Returns:
- the created
ILcdPoint.
-
createEllipse
Creates aILcdEllipseform givenAttributes. This is a non - true - svg object!- Parameters:
aAttributes- theAttributescontaining the info to create the object.- Returns:
- the created
ILcdEllipse.
-
createArcBand
Creates aILcdArcBandform givenAttributes. This is a non - true - svg object !- Parameters:
aAttributes- theAttributescontaining the info to create the object.- Returns:
- the created
ILcdArcBand.
-
setText
Sets aStringas the text of anILcdText.- Parameters:
aTextObject- aILcdText.aText- aString.
-
createUnknownShape
creates an unknownILcdShapeof 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 aStringas 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.
-