|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.view.AbstractCustomNodePainter
y.view.ShinyPlateNodePainter
public class ShinyPlateNodePainter
Draws a simple floating shiny plate with a slight gradient, a thin border and an optional simple drop shadow.
| Constructor Summary | |
|---|---|
ShinyPlateNodePainter()
Creates a new instance of this Painter. |
|
| Method Summary | |
|---|---|
boolean |
contains(NodeRealizer context,
double x,
double y)
Used as a callback for the GenericNodeRealizer.contains(double, double) method. |
double |
getRadius()
Returns the radius of the rounded corners of the rounded rectangle shape. |
Color |
getShadowColor()
Gets the color of the shadow. |
boolean |
isDrawShadow()
Returns whether the painter will draw a drop shadow effect. |
protected void |
paintNode(NodeRealizer context,
Graphics2D graphics,
boolean sloppy)
Callback method to be overwritten by subclasses called by AbstractCustomNodePainter.paint(NodeRealizer, Graphics2D). |
void |
setDrawShadow(boolean drawShadow)
Sets whether the painter will draw a drop shadow effect. |
void |
setRadius(double radius)
Sets the radius of the rounded corners of the rounded rectangle shape. |
void |
setShadowColor(Color shadowColor)
Sets the color of the shadow. |
| Methods inherited from class y.view.AbstractCustomNodePainter |
|---|
backupGraphics, createSelectionColor, 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 |
|---|
public ShinyPlateNodePainter()
| Method Detail |
|---|
protected void paintNode(NodeRealizer context,
Graphics2D graphics,
boolean sloppy)
AbstractCustomNodePainterAbstractCustomNodePainter.paint(NodeRealizer, Graphics2D).
This method is responsible for drawing the actual node only - neither
the hotspots, nor the labels, should be painted by this method.
paintNode in class AbstractCustomNodePaintercontext - the context nodegraphics - the graphics context to usesloppy - whether to draw the node sloppilyAbstractCustomNodePainter.initializeLine(NodeRealizer, Graphics2D),
AbstractCustomNodePainter.initializeFill(NodeRealizer, Graphics2D)public boolean isDrawShadow()
true.
public void setDrawShadow(boolean drawShadow)
true.
drawShadow - Whether to draw a drop shadow.public double getRadius()
public void setRadius(double radius)
radius - the radius to use for the rounded rectangle corners.public Color getShadowColor()
public void setShadowColor(Color shadowColor)
shadowColor - the color of the shadow.
public boolean contains(NodeRealizer context,
double x,
double y)
GenericNodeRealizer.ContainsTestGenericNodeRealizer.contains(double, double) method.
contains in interface GenericNodeRealizer.ContainsTest
|
© Copyright 2000-2008, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||