Class BasicVertexRenderer<V,E>

java.lang.Object
edu.uci.ics.jung.visualization.renderers.BasicVertexRenderer<V,E>
All Implemented Interfaces:
Renderer.Vertex<V,E>
Direct Known Subclasses:
CachingVertexRenderer, VertexImageShaperDemo.DemoRenderer

public class BasicVertexRenderer<V,E> extends Object implements Renderer.Vertex<V,E>
  • Constructor Details

    • BasicVertexRenderer

      public BasicVertexRenderer()
  • Method Details

    • paintVertex

      public void paintVertex(RenderContext<V,E> rc, Layout<V,E> layout, V v)
      Specified by:
      paintVertex in interface Renderer.Vertex<V,E>
    • prepareFinalVertexShape

      protected Shape prepareFinalVertexShape(RenderContext<V,E> rc, V v, Layout<V,E> layout, int[] coords)
      Returns the vertex shape in view coordinates.
      Parameters:
      rc - the render context used for rendering the vertex
      v - the vertex whose shape is to be returned
      layout - the layout algorithm that provides coordinates for the vertex
      coords - the x and y view coordinates
      Returns:
      the vertex shape in view coordinates
    • paintIconForVertex

      protected void paintIconForVertex(RenderContext<V,E> rc, V v, Layout<V,E> layout)
      Paint v's icon on g at (x,y).
      Parameters:
      rc - the render context used for rendering the vertex
      v - the vertex to be painted
      layout - the layout algorithm that provides coordinates for the vertex
    • vertexHit

      protected boolean vertexHit(RenderContext<V,E> rc, Shape s)
    • paintShapeForVertex

      protected void paintShapeForVertex(RenderContext<V,E> rc, V v, Shape shape)