edu.uci.ics.jung.visualization
Interface Renderer

All Known Implementing Classes:
AbstractRenderer, PluggableRendererDecorator

public interface Renderer

Draws individual vertices 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 PluggableRenderer 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(Graphics g, Edge e, int x1, int y1, int x2, int y2)
           
 void paintVertex(Graphics g, Vertex v, int x, int y)
           
 void setPickedKey(PickedInfo pk)
          Deprecated. Use an independent PickedInfo instance.
 

Method Detail

paintVertex

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

paintEdge

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

setPickedKey

public void setPickedKey(PickedInfo pk)
Deprecated. Use an independent PickedInfo instance.

This call allows a Renderer to ask whether a vertex is picked or not.