public class FadeEdgeRenderer extends java.lang.Object implements TimeEdgeRenderer
Constructor and Description |
---|
FadeEdgeRenderer(EdgeRenderer renderer)
Creates a new FadeEdgeRenderer object.
|
Modifier and Type | Method and Description |
---|---|
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.
|
java.awt.Color |
getColor()
Gets the color for the Renderer
|
java.util.Date |
getCurTime()
Returns the time used by the renderer to render the edges.
|
java.util.List<java.awt.Point> |
getEdgePoints(java.lang.Object edge,
java.awt.Point origLoc,
java.awt.Point destLoc)
Method to return the sequence of points used to draw the path for a
particular edge.
|
void |
highlightEdge(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 pick point is within the drawn area for the
edge.
|
void |
setColor(java.awt.Color color)
Sets the color for the EdgeRenderer.
|
void |
setCurTime(java.util.Date time)
Sets the time used by the renderer to render the edges.
|
public FadeEdgeRenderer(EdgeRenderer renderer)
renderer
- a sub-Renderer to use for the edges when visiblepublic void drawEdge(java.awt.Graphics g, java.lang.Object edge, java.awt.Point origLoc, java.awt.Point destLoc)
Sequential
, thos method only draws them if the edge is
active, or if the sequence has no time spans at all.drawEdge
in interface EdgeRenderer
g
- the Graphics context to display the edgeedge
- the edge to displayorigLoc
- location of the origin nodedestLoc
- location of the destination nodepublic java.awt.Color getColor()
getColor
in interface EdgeRenderer
public java.util.Date getCurTime()
getCurTime
in interface Temporal
public java.util.List<java.awt.Point> getEdgePoints(java.lang.Object edge, java.awt.Point origLoc, java.awt.Point destLoc)
getEdgePoints
in interface EdgeRenderer
edge
- the GraphEdge to figure the points fororigLoc
- location of the origin nodedestLoc
- location of the destination nodepublic void highlightEdge(java.awt.Graphics g, java.lang.Object edge, java.awt.Point origLoc, java.awt.Point destLoc)
highlightEdge
in interface EdgeRenderer
g
- the Graphics context to display the edgeedge
- the edge to displayorigLoc
- location of the origin nodedestLoc
- 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
edge
- the edge to check for pickingpickPoint
- the coordinate of the point to checkorigLoc
- location of the origin nodedestLoc
- location of the destination nodepublic void setColor(java.awt.Color color)
setColor
in interface EdgeRenderer
color
- the color for this rendererpublic void setCurTime(java.util.Date time)
setCurTime
in interface Temporal
time
- time used to render edges