public class FadeNodeRenderer extends java.lang.Object implements NodeRenderer, Animatable
Animatable.Animation
Constructor and Description |
---|
FadeNodeRenderer(NodeRenderer renderer)
Instantiates a new fade node renderer.
|
Modifier and Type | Method and Description |
---|---|
void |
drawNode(java.awt.Graphics g,
java.lang.Object node,
java.awt.Point loc)
Draws the node into the Graphics Context.
|
Animatable.Animation |
getAnimationFlag()
Get the animation flag
|
double |
getAnimationStep()
Get the animation step
|
java.awt.Color |
getColor()
Get the color for this node renderer.
|
java.awt.Rectangle |
getNodeBounds(java.lang.Object node,
java.awt.Point loc)
Gets the node bounds.
|
void |
highlightNode(java.awt.Graphics g,
java.lang.Object node,
java.awt.Point loc)
Highlight a node.
|
boolean |
pickNode(java.lang.Object node,
java.awt.Point nodeLoc,
java.awt.Point pickPoint)
Checks whether the specified pickpoint is within the drawn area for the
node.
|
void |
setAnimationFlag(Animatable.Animation flag)
Set the animation flag.
|
void |
setAnimationStep(double frac)
Set the animation step
|
void |
setColor(java.awt.Color color)
Set the color.
|
public FadeNodeRenderer(NodeRenderer renderer)
renderer
- the rendererpublic void drawNode(java.awt.Graphics g, java.lang.Object node, java.awt.Point loc)
drawNode
in interface NodeRenderer
g
- the Graphics context to display the nodenode
- the node to displayloc
- The node locationpublic Animatable.Animation getAnimationFlag()
getAnimationFlag
in interface Animatable
public double getAnimationStep()
getAnimationStep
in interface Animatable
public java.awt.Color getColor()
getColor
in interface NodeRenderer
public java.awt.Rectangle getNodeBounds(java.lang.Object node, java.awt.Point loc)
getNodeBounds
in interface NodeRenderer
node
- the nodeloc
- the location of the nodepublic void highlightNode(java.awt.Graphics g, java.lang.Object node, java.awt.Point loc)
highlightNode
in interface NodeRenderer
g
- the Graphics context to display the nodenode
- the node to displayloc
- The node locationpublic boolean pickNode(java.lang.Object node, java.awt.Point nodeLoc, java.awt.Point pickPoint)
pickNode
in interface NodeRenderer
node
- the node to check for pickingnodeLoc
- The node locationpickPoint
- the coordinate of the point to checkpublic void setAnimationFlag(Animatable.Animation flag)
setAnimationFlag
in interface Animatable
flag
- animation flagpublic void setAnimationStep(double frac)
setAnimationStep
in interface Animatable
frac
- the animation steppublic void setColor(java.awt.Color color)
setColor
in interface NodeRenderer
color
- the color for this renderer