|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.view.AbstractCustomNodePainter
yext.svg.view.SVGPainter
public class SVGPainter
A delegate painter for GenericNodeRealizer that can display
SVG graphics.
![]() |
![]() |
| Constructor Summary | |
|---|---|
SVGPainter(SVGModel model)
Creates a new SVGPainter 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 | |
|---|---|
boolean |
contains(NodeRealizer context,
double x,
double y)
Determines whether or not the specified point lies inside the specified realizer. |
SVGModel |
getModel()
Returns the underlying SVG model of this class. |
boolean |
isUsingVisualBounds()
Returns whether or not the visual bounds of the displayed vector graphic are used for contains tests. |
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. |
void |
setUsingVisualBounds(boolean enabled)
Specifies whether or not the visual bounds of the displayed vector graphic are used for contains tests. |
| Methods inherited from class y.view.AbstractCustomNodePainter |
|---|
backupGraphics, createSelectionColor, getFillColor, getFillColor2, getFillPaint, getLineColor, getLinePaint, getLineStroke, initializeFill, initializeLine, paint, paintHotSpots, paintPorts, paintSloppy, paintText, restoreGraphics |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SVGPainter(URL svgURL)
public SVGPainter(SVGModel model)
| Method Detail |
|---|
protected void paintNode(NodeRealizer context,
Graphics2D graphics,
boolean sloppy)
paintNode in class AbstractCustomNodePaintersloppy - is currently ignored.
public boolean contains(NodeRealizer context,
double x,
double y)
contains in interface GenericNodeRealizer.ContainsTestcontext - the realizer to check.x - the x-coordinate of the point to check.y - the y-coordinate of the point to check.
true if the specified point lies inside the specified
realizer; false otherwise.isUsingVisualBounds(),
setUsingVisualBounds(boolean)public SVGModel getModel()
public void setModel(SVGModel model)
model - the SVG model to use. May not be null!public boolean isUsingVisualBounds()
Defaults to false.
true if the visual bounds of the displayed vector
graphic are used for contains tests and false if the
context realizer's rectangular bounding box is used for contains tests.setUsingVisualBounds(boolean),
contains(y.view.NodeRealizer, double, double)public void setUsingVisualBounds(boolean enabled)
Defaults to false.
enabled - if true the visual bounds of the displayed
vector graphic are used for contains tests; otherwise the context
realizer's rectangular bounding box is used for contains tests.isUsingVisualBounds(),
contains(y.view.NodeRealizer, double, double)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||