public class IltPortSVGBaseRendererFactory extends IltSVGBaseRendererFactory implements IltBaseRendererFactory
It is easy to create a new port type with the following code:
IltPort.Type newType = new IltPort.Type(YOUR_NEW_TYPE_NAME); try { URL url = new URL("file","",YOUR_SVG_FILE_NAME); IltPortSVGBaseRendererFactory factory = new IltPortSVGBaseRendererFactory(url); IltSettings.SetValue("Port.Type.YOUR_NEW_TYPE_NAME.Renderer", factory); } catch (Exception e) { e.printStackTrace(); }
IltPort
,
IltSettings
Constructor and Description |
---|
IltPortSVGBaseRendererFactory()
Creates the factory, always returning the same given SVG object.
|
IltPortSVGBaseRendererFactory(URL svgURL)
Creates the factory, always returning the same given SVG object.
|
Modifier and Type | Method and Description |
---|---|
IltBaseRenderer |
createValue()
Returns an
IltPortBaseRenderer able to display an SVG object. |
createGraphic, getURL, setURL
public IltPortSVGBaseRendererFactory(URL svgURL)
svgURL
- URL that contains the graphic descriptionpublic IltPortSVGBaseRendererFactory()
IltSVGBaseRendererFactory.setURL(URL)
.public IltBaseRenderer createValue()
IltPortBaseRenderer
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 IltPortBaseRenderer
that is ready to be used in the
Network element representation.
createValue
in interface IltBaseRendererFactory
IltBaseRenderer
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.