public class IltOPCSVGBaseRendererFactory extends IltSVGBaseRendererFactory implements IltBaseRendererFactory
It is easy to create a new port type with the following code:
IltOffPageConnector.Type newType = new IltOffPageConnector.Type(YOUR_NEW_TYPE_NAME); try { URL url = new URL("file","",YOUR_SVG_FILE_NAME); IltOPCSVGBaseRendererFactory factory = new IltOPCSVGBaseRendererFactory(url); IltSettings.SetValue("OffPageConnector.Type.YOUR_NEW_TYPE_NAME.Renderer", factory); } catch (Exception e) { e.printStackTrace(); }
IltOffPageConnector
,
IltSettings
Constructor and Description |
---|
IltOPCSVGBaseRendererFactory()
Creates the factory, always returning the same given SVG object.
|
IltOPCSVGBaseRendererFactory(URL svgURL)
Creates the factory, always returning the same given SVG object.
|
Modifier and Type | Method and Description |
---|---|
IltBaseRenderer |
createValue()
Returns an
IltOPCBaseRenderer able to display an SVG object. |
createGraphic, getURL, setURL
public IltOPCSVGBaseRendererFactory(URL svgURL)
svgURL
- URL that contains the graphic descriptionpublic IltOPCSVGBaseRendererFactory()
IltSVGBaseRendererFactory.setURL(URL)
.public IltBaseRenderer createValue()
IltOPCBaseRenderer
able to display an SVG object.
The SVG graphic object is loaded upon first use. Each call to
this method creates a copy of the SVG graphic object and encapsulates
it within a IltOPCBaseRenderer
that is ready to be used in the
Network element representation.
createValue
in interface IltBaseRendererFactory
IltBaseRenderer
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.