yext.svg.view
Class SVGPainter

java.lang.Object
  extended by y.view.AbstractCustomNodePainter
      extended by yext.svg.view.SVGPainter
All Implemented Interfaces:
GenericNodeRealizer.Painter

public class SVGPainter
extends AbstractCustomNodePainter

A delegate painter for GenericNodeRealizer that can display SVG graphics.


Constructor Summary
SVGPainter(SVGModel model)
          Creates a new SVGIcon that displays the given SVG model
SVGPainter(URL svgURL)
          Creates a new SVGPainter that displays the SVG graphics loaded from the given URL.
 
Method Summary
 SVGModel getModel()
          Returns the underlying SVG model of this class.
protected  void paintNode(NodeRealizer context, Graphics2D graphics, boolean sloppy)
          Paints the SVG on the given graphics context.
 void setModel(SVGModel model)
          Sets the underlying SVG model of this class.
 
Methods inherited from class y.view.AbstractCustomNodePainter
backupGraphics, getFillColor, getFillColor2, getFillPaint, getLineColor, getLinePaint, getLineStroke, initializeFill, initializeLine, paint, paintSloppy, restoreGraphics
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SVGPainter

public SVGPainter(URL svgURL)
Creates a new SVGPainter that displays the SVG graphics loaded from the given URL.


SVGPainter

public SVGPainter(SVGModel model)
Creates a new SVGIcon that displays the given SVG model

Method Detail

paintNode

protected void paintNode(NodeRealizer context,
                         Graphics2D graphics,
                         boolean sloppy)
Paints the SVG on the given graphics context. The SVg will be translated and scaled to fit within the bounds of the given realizer.

Specified by:
paintNode in class AbstractCustomNodePainter
Parameters:
sloppy - is currently ignored.

getModel

public SVGModel getModel()
Returns the underlying SVG model of this class.


setModel

public void setModel(SVGModel model)
Sets the underlying SVG model of this class.


© Copyright 2000-2007,
yWorks GmbH.
All rights reserved.