public interface ILcdSVGShapeFactory
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.Modifier and Type | Method and Description |
---|---|
ILcdArcBand |
createArcBand(Attributes aAttributes)
Creates a
ILcdArcBand form given Attributes . |
ILcdBounds |
createBounds(Attributes aAttributes)
Creates n
ILcdBounds form given Attributes . |
ILcdCircle |
createCircle(Attributes aAttributes)
Creates an
ILcdCircle form given Attributes . |
ILcdEllipse |
createEllipse(Attributes aAttributes)
Creates a
ILcdEllipse form given Attributes . |
ILcdShapeList |
createEmptyShapeList(Attributes aAttributes)
Creates an empty
ILcdShapeList form given Attributes . |
ILcdPolyline |
createLine(Attributes aAttributes)
Creates an
ILcdPolyline form given Attributes . |
ILcdShape |
createPath(Attributes aAttributes)
Creates an
ILcdShape from given Attributes . |
ILcdPoint |
createPoint(Attributes aAttributes)
Creates a
ILcdPoint form given Attributes . |
ILcdPolygon |
createPolygon(Attributes aAttributes)
Creates an
ILcdPolygon form given Attributes . |
ILcdPolyline |
createPolyline(Attributes aAttributes)
Creates an
ILcdPolyline form given Attributes . |
ILcdShapeList |
createShapeList(ILcdShapeList aShapeList,
ILcdShape[] aShapeArray)
Creates an
ILcdShapeList based on an existing ILcdShapeList and an
Array of ILcdShape . |
ILcdText |
createText(Attributes aAttributes)
Creates an
ILcdText form given Attributes . |
ILcdShape |
createUnknownShape(Attributes aAttributes,
String aLocalName)
creates an unknown
ILcdShape of type aLocalname. |
void |
endUnknownShape()
This method is called by the TLcdSVGContentHandler when an unknown element was handled,
regardless of whether or not this created a shape.
|
void |
setText(ILcdText aTextObject,
String aText)
Sets a
String as the text of an ILcdText . |
void |
setUnknownShapeText(Object aObject,
String aText)
Sets a
String as text to the unknown shape. |
ILcdCircle createCircle(Attributes aAttributes)
ILcdCircle
form given Attributes
.aAttributes
- the Attributes
containing the info to create the object.ILcdCirlce
.ILcdPolyline createPolyline(Attributes aAttributes)
ILcdPolyline
form given Attributes
.aAttributes
- the Attributes
containing the info to create the object.ILcdCirlce
.ILcdPolyline createLine(Attributes aAttributes)
ILcdPolyline
form given Attributes
. A Line is a Polyline with
only 2 points.aAttributes
- the Attributes
containing the info to create the object.ILcdCirlce
.ILcdPolygon createPolygon(Attributes aAttributes)
ILcdPolygon
form given Attributes
.aAttributes
- the Attributes
containing the info to create the object.ILcdPolygon
.ILcdShape createPath(Attributes aAttributes)
ILcdShape
from given Attributes
. This shape can be
a ILcdPolyline
or a ILcdPolygon
, depending on whether the path
is closed or not, or a ILcdShapeList
containing ILcdPolyline
objects
and/or ILcdPolygon
objects.aAttributes
- the Attributes
containing the info to create the object.ILcdShape
.ILcdBounds createBounds(Attributes aAttributes)
ILcdBounds
form given Attributes
.aAttributes
- the Attributes
containing the info to create the object.ILcdBounds
.ILcdText createText(Attributes aAttributes)
ILcdText
form given Attributes
.aAttributes
- the Attributes
containing the info to create the object.ILcdText
.ILcdShapeList createEmptyShapeList(Attributes aAttributes)
ILcdShapeList
form given Attributes
.aAttributes
- the Attributes
containing the info to create the object.ILcdShapeList
.ILcdShapeList createShapeList(ILcdShapeList aShapeList, ILcdShape[] aShapeArray)
ILcdShapeList
based on an existing ILcdShapeList
and an
Array
of ILcdShape
.aShapeList
- the ILcdShapeList
.aShapeArray
- the Array
of ILcdShape
to fill the object.ILcdShapeList
.ILcdPoint createPoint(Attributes aAttributes)
ILcdPoint
form given Attributes
.
This is a non - true - svg object!aAttributes
- the Attributes
containing the info to create the object.ILcdPoint
.ILcdEllipse createEllipse(Attributes aAttributes)
ILcdEllipse
form given Attributes
.
This is a non - true - svg object!aAttributes
- the Attributes
containing the info to create the object.ILcdEllipse
.ILcdArcBand createArcBand(Attributes aAttributes)
ILcdArcBand
form given Attributes
.
This is a non - true - svg object !aAttributes
- the Attributes
containing the info to create the object.ILcdArcBand
.void setText(ILcdText aTextObject, String aText)
String
as the text of an ILcdText
.aTextObject
- a ILcdText
.aText
- a String
.ILcdShape createUnknownShape(Attributes aAttributes, String aLocalName)
ILcdShape
of type aLocalname.aAttributes
- the attributes to create the unknown shape.aLocalName
- the type of the unknown shape, the name of the xml element.ILcdShape
void endUnknownShape()
void setUnknownShapeText(Object aObject, String aText)
String
as text to the unknown shape. The text is the character data between the
begin and end tag of the unknown shape.aObject
- a Object
, the unknown shape.aText
- a String
, the text to set to the unknown shape.