public class SVGDefaultGraphicFactory extends Object implements SVGGraphicFactory
SVGGraphicFactory.SVGDocumentReader,
SVGDocumentReaderConfigurator.setGraphicFactory(ilog.views.svg.SVGGraphicFactory)| Constructor and Description |
|---|
SVGDefaultGraphicFactory()
Creates a new default graphic factory for importing SVG files as
Perforce JViews graphic objects.
|
| 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 graphic 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.
|
public SVGDefaultGraphicFactory()
public 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).
addObject in interface SVGGraphicFactoryobj - 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.public 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).
addObject in interface SVGGraphicFactoryobj - The graphic object to be added to the bag.bag - The bag where the graphic object must be added.public IlvManagerLayer findFreeLayer(IlvManager manager)
The default implementation adds a new layer on top of the existing layers (if any).
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.
findFreeLayer in interface SVGGraphicFactorymanager - The manager into which the content of the SVG file is read.manager.public IlvGeneralPath createGeneralPath()
createGeneralPath in interface SVGGraphicFactorypublic IlvGraphicSet createGraphicSet()
createGraphicSet in interface SVGGraphicFactorypublic IlvIcon createIcon(URL url, IlvRect rect)
createIcon in interface SVGGraphicFactoryurl - The URL of the bitmap image.rect - The definition rectangle of the object.public IlvIcon createIcon(String location, IlvRect rect)
createIcon in interface SVGGraphicFactorylocation - The location of the bitmap image. This is in particular used
when the location is "data: ..."rect - The definition rectangle of the object.public IlvTextPath createTextPath(Shape shape, String text)
createTextPath in interface SVGGraphicFactoryshape - The baseline of the text path.text - The text.public IlvZoomableLabel createZoomableLabel(IlvPoint position, String label)
createZoomableLabel in interface SVGGraphicFactoryposition - The position of the label object.label - The text of the label.public IlvText createText(IlvPoint position, String text)
createText in interface SVGGraphicFactoryposition - The position of the text object.text - The text.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.