public class IltCardSVGBaseRendererFactory extends IltSVGBaseRendererFactory implements IltBaseRendererFactory
It is easy to create a new card type with the following code:
IltCard.Type newType = new IltCard.Type(YOUR_NEW_TYPE_NAME); try { URL url = new URL("file","",YOUR_SVG_FILE_NAME); IltCardSVGBaseRendererFactory factory = new IltCardSVGBaseRendererFactory(url); IltSettings.SetValue("Card.Type.YOUR_NEW_TYPE_NAME.Renderer", factory); } catch (Exception e) { e.printStackTrace(); }
Constructor and Description |
---|
IltCardSVGBaseRendererFactory()
Creates the factory, always returning the same given SVG object.
|
IltCardSVGBaseRendererFactory(URL svgURL)
Creates the factory, always returning the same given SVG object.
|
Modifier and Type | Method and Description |
---|---|
IltBaseRenderer |
createValue()
Returns an
IltCardBaseRenderer able to display an SVG object. |
createGraphic, getURL, setURL
public IltCardSVGBaseRendererFactory(URL svgURL)
svgURL
- URL that contains the graphic descriptionpublic IltCardSVGBaseRendererFactory()
The SVG graphic object is read from the file upon first use.
The SVG graphic description must be specified before using the
renderer through IltSVGBaseRendererFactory.setURL(URL)
.
public IltBaseRenderer createValue()
IltCardBaseRenderer
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 IltCardBaseRenderer
that is ready to be used in the
card representation.
createValue
in interface IltBaseRendererFactory
IltBaseRenderer
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.