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

java.lang.Object
edu.uci.ics.jung.visualization.renderers.BasicVertexRenderer<V,E>
ghidra.graph.viewer.vertex.AbstractVisualVertexRenderer<V,E>
ghidra.graph.viewer.vertex.VisualVertexRenderer<V,E>
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)
  • Constructor Details

    • VisualVertexRenderer

      public VisualVertexRenderer()
  • Method Details

    • 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, 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, Shape compactShape, 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, 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, Shape shape)