|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A _Renderer does the actual job of drawing individual nodes and edges on a display. Given a Graphics context, it paints a Vertex or an Edge appropriately.
Users must provide an appropriate _Renderer, if they are rendering to AWT / Swing. (Presumably, a similar mechanism might be built for other Graphics types; however, this class and its implementations are all Swing specific).
The SettableRenderer
is a good starting _Renderer for off-the shelf use.
In general, one can expect that PaintVertex and PaintEdge will only be called with visible edges and visible vertices.
Method Summary | |
void |
paintEdge(java.awt.Graphics g,
Edge e,
int x1,
int y1,
int x2,
int y2)
|
void |
paintVertex(java.awt.Graphics g,
Vertex v,
int x,
int y)
|
void |
setPickedKey(PickedInfo pk)
This call allows a _Renderer to ask whether a vertex is picked or not. |
Method Detail |
public void paintVertex(java.awt.Graphics g, Vertex v, int x, int y)
public void paintEdge(java.awt.Graphics g, Edge e, int x1, int y1, int x2, int y2)
public void setPickedKey(PickedInfo pk)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |