edu.uci.ics.jung.visualization
Interface Renderer

All Known Implementing Classes:
AbstractRenderer

public interface Renderer

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.

Author:
danyelf

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

paintVertex

public void paintVertex(java.awt.Graphics g,
                        Vertex v,
                        int x,
                        int y)

paintEdge

public void paintEdge(java.awt.Graphics g,
                      Edge e,
                      int x1,
                      int y1,
                      int x2,
                      int y2)

setPickedKey

public void setPickedKey(PickedInfo pk)
This call allows a _Renderer to ask whether a vertex is picked or not.