public interface NodeRenderer
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.
|
java.awt.Color |
getColor()
Gets the color for the Renderer, if any
|
java.awt.Rectangle |
getNodeBounds(java.lang.Object node,
java.awt.Point loc)
Returns the bounding box for the node using this renderer.
|
void |
highlightNode(java.awt.Graphics g,
java.lang.Object node,
java.awt.Point loc)
Draws the node into the Graphics Context in a highlighted fashion.
|
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 |
setColor(java.awt.Color color)
Sets the color for the NodeRenderer.
|
void drawNode(java.awt.Graphics g, java.lang.Object node, java.awt.Point loc)
g
- the Graphics context to display the nodenode
- the node to displayloc
- The node locationjava.awt.Color getColor()
java.awt.Rectangle getNodeBounds(java.lang.Object node, java.awt.Point loc)
node
- The nodeloc
- The node locationvoid highlightNode(java.awt.Graphics g, java.lang.Object node, java.awt.Point loc)
g
- the Graphics context to display the nodenode
- the node to displayloc
- The node locationboolean pickNode(java.lang.Object node, java.awt.Point nodeLoc, java.awt.Point pickPoint)
node
- the node to check for pickingnodeLoc
- The node locationpickPoint
- the coordinate of the point to checkvoid setColor(java.awt.Color color)
color
- the color for this renderer