Class CachingEdgeRenderer<V,E>

java.lang.Object
edu.uci.ics.jung.visualization.renderers.BasicEdgeRenderer<V,E>
edu.uci.ics.jung.visualization.renderers.CachingEdgeRenderer<V,E>
All Implemented Interfaces:
LayoutChangeListener<V,E>, Renderer.Edge<V,E>, EventListener, ChangeListener

public class CachingEdgeRenderer<V,E> extends BasicEdgeRenderer<V,E> implements ChangeListener, LayoutChangeListener<V,E>
  • Field Details

    • edgeShapeMap

      protected Map<E,Shape> edgeShapeMap
    • dirtyEdges

      protected Set<E> dirtyEdges
  • Constructor Details

  • Method Details

    • drawSimpleEdge

      protected void drawSimpleEdge(RenderContext<V,E> rc, Layout<V,E> layout, E e)
      Draws the edge e, whose endpoints are at (x1,y1) and (x2,y2), on the graphics context g. The Shape provided by the EdgeShapeFunction instance is scaled in the x-direction so that its width is equal to the distance between (x1,y1) and (x2,y2).
      Overrides:
      drawSimpleEdge in class BasicEdgeRenderer<V,E>
      Parameters:
      rc - the render context used for rendering the edge
      layout - the layout instance which provides the edge's endpoints' coordinates
      e - the edge to be drawn
    • stateChanged

      public void stateChanged(ChangeEvent evt)
      Specified by:
      stateChanged in interface ChangeListener
    • layoutChanged

      public void layoutChanged(LayoutEvent<V,E> evt)
      Specified by:
      layoutChanged in interface LayoutChangeListener<V,E>