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 theVisualGraph
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)
-
-
Constructor Summary
Constructors Constructor Description VisualVertexRenderer()
-
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 ghidra.graph.viewer.vertex.AbstractVisualVertexRenderer
adjustValueForCurrentScale, getCompactShape, getEmphasisGraphics, getFullShape, getScale, isScaledPastVertexInteractionThreshold, paintDropShadow, paintHighlight, transformFromLayoutToView
-
-
-
-
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 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
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)
-
-