Class VisualVertexRenderer<V extends VisualVertex,​E extends VisualEdge<V>>

  • Type Parameters:
    V - the vertex type
    E - the edge type
    All Implemented Interfaces:
    edu.uci.ics.jung.visualization.renderers.Renderer.Vertex<V,​E>

    public class VisualVertexRenderer<V extends VisualVertex,​E extends VisualEdge<V>>
    extends AbstractVisualVertexRenderer<V,​E>
    A renderer for the VisualGraph system.

    Rendering in the graph system is a bit different than other Java rendering systems. For example, when a JTable renders itself, it uses a single renderer to stamp the data. The table's renderer has no state and is updated for each cell's data that is to be rendered. The graph renderer system is different due to the possibility of complex vertex UIs. Some vertices have sophisticated UI elements that have state. For these vertices, it makes sense for the vertex to build and maintain that state; having that state repeatedly built by the renderer would be extremely inefficient and difficult to implement. Considering that we expect the vertex to build and maintain its UI, this renderer is really just a tool to:

    1. Determine if the vertex needs to be painted (by clipping or filtering)
    2. Setup the geometry for the vertex (convert the model's location to the view location, accounting for panning and zooming)
    3. Paint any added effects (such as drop-shadows or highlighting)
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface edu.uci.ics.jung.visualization.renderers.Renderer.Vertex

        edu.uci.ics.jung.visualization.renderers.Renderer.Vertex.NOOP
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean isScaledPastVertexPaintingThreshold​(edu.uci.ics.jung.visualization.RenderContext<V,​E> rc)  
      protected void paintDropShadow​(edu.uci.ics.jung.visualization.RenderContext<V,​E> rc, edu.uci.ics.jung.visualization.transform.shape.GraphicsDecorator g, java.awt.Shape shape, V vertex)  
      protected void paintScaledVertex​(edu.uci.ics.jung.visualization.RenderContext<V,​E> rc, V vertex, edu.uci.ics.jung.visualization.transform.shape.GraphicsDecorator g, java.awt.Shape shape)  
      void paintVertex​(edu.uci.ics.jung.visualization.RenderContext<V,​E> rc, edu.uci.ics.jung.algorithms.layout.Layout<V,​E> layout, V vertex)  
      protected void paintVertex​(edu.uci.ics.jung.visualization.RenderContext<V,​E> rc, edu.uci.ics.jung.visualization.transform.shape.GraphicsDecorator g, V vertex, java.awt.Rectangle bounds, edu.uci.ics.jung.algorithms.layout.Layout<V,​E> layout)  
      protected void paintVertexOrVertexShape​(edu.uci.ics.jung.visualization.RenderContext<V,​E> rc, edu.uci.ics.jung.visualization.transform.shape.GraphicsDecorator g, edu.uci.ics.jung.algorithms.layout.Layout<V,​E> layout, V vertex, java.awt.Shape compactShape, java.awt.Shape fullShape)  
      • Methods inherited from class edu.uci.ics.jung.visualization.renderers.BasicVertexRenderer

        paintIconForVertex, paintShapeForVertex, prepareFinalVertexShape, vertexHit
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VisualVertexRenderer

        public VisualVertexRenderer()
    • Method Detail

      • paintVertex

        public void paintVertex​(edu.uci.ics.jung.visualization.RenderContext<V,​E> rc,
                                edu.uci.ics.jung.algorithms.layout.Layout<V,​E> layout,
                                V vertex)
        Specified by:
        paintVertex in interface edu.uci.ics.jung.visualization.renderers.Renderer.Vertex<V extends VisualVertex,​E extends VisualEdge<V>>
        Overrides:
        paintVertex in class edu.uci.ics.jung.visualization.renderers.BasicVertexRenderer<V extends VisualVertex,​E extends VisualEdge<V>>
      • paintDropShadow

        protected void paintDropShadow​(edu.uci.ics.jung.visualization.RenderContext<V,​E> rc,
                                       edu.uci.ics.jung.visualization.transform.shape.GraphicsDecorator g,
                                       java.awt.Shape shape,
                                       V vertex)
      • paintVertexOrVertexShape

        protected void paintVertexOrVertexShape​(edu.uci.ics.jung.visualization.RenderContext<V,​E> rc,
                                                edu.uci.ics.jung.visualization.transform.shape.GraphicsDecorator g,
                                                edu.uci.ics.jung.algorithms.layout.Layout<V,​E> layout,
                                                V vertex,
                                                java.awt.Shape compactShape,
                                                java.awt.Shape fullShape)
      • paintVertex

        protected void paintVertex​(edu.uci.ics.jung.visualization.RenderContext<V,​E> rc,
                                   edu.uci.ics.jung.visualization.transform.shape.GraphicsDecorator g,
                                   V vertex,
                                   java.awt.Rectangle bounds,
                                   edu.uci.ics.jung.algorithms.layout.Layout<V,​E> layout)
      • isScaledPastVertexPaintingThreshold

        protected boolean isScaledPastVertexPaintingThreshold​(edu.uci.ics.jung.visualization.RenderContext<V,​E> rc)
      • paintScaledVertex

        protected void paintScaledVertex​(edu.uci.ics.jung.visualization.RenderContext<V,​E> rc,
                                         V vertex,
                                         edu.uci.ics.jung.visualization.transform.shape.GraphicsDecorator g,
                                         java.awt.Shape shape)