public class WeightEdgeRenderer extends SimpleEdgeRenderer
Constructor and Description |
---|
WeightEdgeRenderer() |
Modifier and Type | Method and Description |
---|---|
protected float |
calcEdgeWidth(Weighted edge)
Calculate the line width used to draw the edge.
|
void |
drawEdge(java.awt.Graphics g,
java.lang.Object edge,
java.awt.Point origLoc,
java.awt.Point destLoc)
Draws the edge into the Graphics Context.
|
boolean |
pickEdge(java.lang.Object edge,
java.awt.Point pickPoint,
java.awt.Point origLoc,
java.awt.Point destLoc)
Checks whether the specified pickpoint is within the drawn area for the
edge.
|
getColor, getEdgeColor, getEdgePoints, getHighlight, highlightEdge, setColor, setHighlight
protected float calcEdgeWidth(Weighted edge)
edge
- the weighted edge to drawpublic void drawEdge(java.awt.Graphics g, java.lang.Object edge, java.awt.Point origLoc, java.awt.Point destLoc)
drawEdge
in interface EdgeRenderer
drawEdge
in class SimpleEdgeRenderer
g
- the Graphics context to display the edgeedge
- the edge to displayorigLoc
- the location of the origin nodedestLoc
- the location of the destination nodepublic boolean pickEdge(java.lang.Object edge, java.awt.Point pickPoint, java.awt.Point origLoc, java.awt.Point destLoc)
pickEdge
in interface EdgeRenderer
pickEdge
in class SimpleEdgeRenderer
edge
- the node to check for pickingpickPoint
- the coordinate of the point to checkorigLoc
- the orig locdestLoc
- the dest loc