public interface SVGGraphicFactory
By default, the SVG reader uses the default implementation SVGDefaultGraphicFactory
.
The main purpose of this interface is to allow the creation of subclasses of the default graphic object classes or manager layer class.
SVGDocumentReader
,
SVGDocumentReaderConfigurator.setGraphicFactory(ilog.views.svg.SVGGraphicFactory)
Modifier and Type | Method and Description |
---|---|
void |
addObject(IlvGraphic obj,
IlvGraphicBag bag)
Adds a graphic object to a given graphic bag.
|
void |
addObject(IlvGraphic obj,
IlvManager manager,
int layerIndex)
Adds a graphic object to a given layer of a manager.
|
IlvGeneralPath |
createGeneralPath()
Creates a general path graphic object.
|
IlvGraphicSet |
createGraphicSet()
Creates a graphic set object.
|
IlvIcon |
createIcon(String location,
IlvRect rect)
Creates an icon graphic object.
|
IlvIcon |
createIcon(URL url,
IlvRect rect)
Creates an icon object.
|
IlvText |
createText(IlvPoint position,
String text)
Creates a text graphic object.
|
IlvTextPath |
createTextPath(Shape shape,
String text)
Creates a text path graphic object.
|
IlvZoomableLabel |
createZoomableLabel(IlvPoint position,
String label)
Creates a zoomable label graphic object.
|
IlvManagerLayer |
findFreeLayer(IlvManager manager)
Finds a new free manager layer.
|
void addObject(IlvGraphic obj, IlvManager manager, int layerIndex)
The SVG reader calls this method if the content of the SVG file is read
into an IlvManager
or a subclass. Otherwise,
if the reading is done in another type of IlvGraphicBag
,
for instance in an IlvGraphicSet
,
the reader calls the method addObject(IlvGraphic, IlvGraphicBag)
.
obj
- The graphic object to be added to the manager.manager
- The manager into which the content of the SVG file is read.layerIndex
- The index of the manager layer where the object must
be added.void addObject(IlvGraphic obj, IlvGraphicBag bag)
The SVG reader calls this method if the content of the SVG file is read
into a IlvGraphicBag
which is not an IlvManager
or
a subclass, for instance an IlvGraphicSet
.
Otherwise, if the reading is done in an IlvManager
or a subclass,
the reader calls the method addObject(IlvGraphic, IlvManager, int)
.
obj
- The graphic object to be added to the bag.bag
- The bag where the graphic object must be added.IlvManagerLayer findFreeLayer(IlvManager manager)
Note the following:
layerIndex
argument of the method
addObject(IlvGraphic, IlvManager, int)
the index of the
layer (see IlvManagerLayer.getIndex()
) returned by the
method prepareLayer
for the corresponding layer.
manager
- The manager into which the content of the SVG file is read.manager
.IlvGeneralPath createGeneralPath()
IlvGraphicSet createGraphicSet()
IlvIcon createIcon(URL url, IlvRect rect)
url
- The URL of the bitmap image.rect
- The definition rectangle of the object.IlvIcon createIcon(String location, IlvRect rect)
location
- The location of the bitmap image. This is in particular used
when the location is "data: ..."rect
- The definition rectangle of the object.IlvTextPath createTextPath(Shape shape, String text)
shape
- The baseline of the text path.text
- The text.IlvZoomableLabel createZoomableLabel(IlvPoint position, String label)
position
- The position of the label object.label
- The text of the label.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.