yext.svg.view
Class SVGIcon

java.lang.Object
  extended by yext.svg.view.SVGIcon
All Implemented Interfaces:
Icon

public class SVGIcon
extends Object
implements Icon

An icon implementation that displays scalable vector graphics.

 

Constructor Summary
SVGIcon()
          Initializes a new SVGIcon instance without associated SVG graphics.
SVGIcon(SVGModel model)
          Initializes a new SVGIcon instance that displays the given scalable vector graphics.
SVGIcon(URL svgURL)
          Initializes a new SVGIcon instance that displays the referenced SVG document.
 
Method Summary
 int getIconHeight()
           
 int getIconWidth()
           
 SVGModel getModel()
          Returns the underlying SVG model for this SVGIcon.
 void paintIcon(Component c, Graphics gfx, int x, int y)
           
 void setModel(SVGModel model)
          Sets the underlying SVG model for this SVGIcon.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SVGIcon

public SVGIcon(URL svgURL)
Initializes a new SVGIcon instance that displays the referenced SVG document.

Parameters:
svgURL - the URL of the SVG document to display.

SVGIcon

public SVGIcon(SVGModel model)
Initializes a new SVGIcon instance that displays the given scalable vector graphics.

Parameters:
model - the scalable vector graphics to display. May not be null!

SVGIcon

public SVGIcon()
Initializes a new SVGIcon instance without associated SVG graphics. Use setModel(SVGModel) to specify the vector graphics to display.

Method Detail

getIconHeight

public int getIconHeight()
Specified by:
getIconHeight in interface Icon

getIconWidth

public int getIconWidth()
Specified by:
getIconWidth in interface Icon

paintIcon

public void paintIcon(Component c,
                      Graphics gfx,
                      int x,
                      int y)
Specified by:
paintIcon in interface Icon

getModel

public SVGModel getModel()
Returns the underlying SVG model for this SVGIcon.


setModel

public void setModel(SVGModel model)
Sets the underlying SVG model for this SVGIcon.

Parameters:
model - the SVG model to use. May not be null!


© Copyright 2002-2015,
yWorks GmbH.
All rights reserved.