public class TextNodeRenderer extends ShapeNodeRenderer
ShapeNodeRenderer.NodeShape| Constructor and Description |
|---|
TextNodeRenderer()
Instantiates a new text 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.
|
java.awt.Font |
getFont()
Gets the font used by the renderer.
|
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 pick point is within the drawn area for the
node.
|
void |
setFont(java.awt.Font newFont)
Sets the font used by the renderer.
|
drawNodeShape, getColor, getNodeColor, getNodeShape, getShape, setColor, setShapepublic TextNodeRenderer()
public void drawNode(java.awt.Graphics g,
java.lang.Object node,
java.awt.Point loc)
drawNode in interface NodeRendererdrawNode in class ShapeNodeRendererg - the Graphics context to display the nodenode - the node to displayloc - the locpublic java.awt.Font getFont()
public java.awt.Rectangle getNodeBounds(java.lang.Object node,
java.awt.Point loc)
getNodeBounds in interface NodeRenderergetNodeBounds in class ShapeNodeRenderernode - the node to be checkedloc - the node locationpublic void highlightNode(java.awt.Graphics g,
java.lang.Object node,
java.awt.Point loc)
highlightNode in interface NodeRendererhighlightNode in class ShapeNodeRendererg - 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 NodeRendererpickNode in class ShapeNodeRenderernode - the node to check for pickingpickPoint - the coordinate of the point to checknodeLoc - the node locpublic void setFont(java.awt.Font newFont)
newFont - the font used by the renderer