Package ghidra.graph.viewer.vertex
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 typeE
- 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:
- Determine if the vertex needs to be painted (by clipping or filtering)
- Setup the geometry for the vertex (convert the model's location to the view location, accounting for panning and zooming)
- 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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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, 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, 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, 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, Shape compactShape, Shape fullShape) Methods inherited from class ghidra.graph.viewer.vertex.AbstractVisualVertexRenderer
adjustValueForCurrentScale, getCompactShape, getEmphasisGraphics, getFullShape, getScale, getVertexFillPaintTransformer, isScaledPastVertexInteractionThreshold, paintDropShadow, paintHighlight, setVertexFillPaintTransformer, transformFromLayoutToView
Methods inherited from class edu.uci.ics.jung.visualization.renderers.BasicVertexRenderer
paintIconForVertex, paintShapeForVertex, prepareFinalVertexShape, vertexHit
-
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 interfaceedu.uci.ics.jung.visualization.renderers.Renderer.Vertex<V extends VisualVertex,
E extends VisualEdge<V>> - Overrides:
paintVertex
in classedu.uci.ics.jung.visualization.renderers.BasicVertexRenderer<V extends VisualVertex,
E extends VisualEdge<V>>
-
paintDropShadow
-
paintVertexOrVertexShape
-
paintVertex
-
isScaledPastVertexPaintingThreshold
-
paintScaledVertex
-