public class IltNESVGBaseRendererFactory extends IltSVGBaseRendererFactory implements IltBaseRendererFactory
It is easy to create a new network element type with the following code:
IltNetworkElement.Type newType = new IltNetworkElement.Type(YOUR_NEW_TYPE_NAME); try { URL url = new URL("file","",YOUR_SVG_FILE_NAME); IltNESVGBaseRendererFactory factory = new IltNESVGBaseRendererFactory(url); IltSettings.SetValue("NetworkElement.Type.YOUR_NEW_TYPE_NAME.Renderer", factory); } catch (Exception e) { e.printStackTrace(); }
IltSettings
Constructor and Description |
---|
IltNESVGBaseRendererFactory()
Creates a Network Element base renderer factory that reads an SVG
object from the file upon first use.
|
IltNESVGBaseRendererFactory(URL svgURL)
Creates a Network Element base renderer factory that reads an SVG
object from the file upon first use.
|
Modifier and Type | Method and Description |
---|---|
IltBaseRenderer |
createValue()
Returns an
IltNEBaseRenderer able to display an SVG object. |
createGraphic, getURL, setURL
public IltNESVGBaseRendererFactory(URL svgURL)
svgURL
- URL that contains the graphic descriptionpublic IltNESVGBaseRendererFactory()
The SVG graphic description must be specified before using
this renderer factory for the first time through method
IltSVGBaseRendererFactory.setURL(URL)
public IltBaseRenderer createValue()
IltNEBaseRenderer
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 IltNEBaseRenderer
that is ready to be used in the
Network element representation.
createValue
in interface IltBaseRendererFactory
IltBaseRenderer
IltSettings
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.