Package ghidra.graph.viewer.vertex
Class AbstractVisualVertexRenderer<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> 
- Type Parameters:
- V- the vertex type
- E- the edge type
- All Implemented Interfaces:
- edu.uci.ics.jung.visualization.renderers.Renderer.Vertex<V,- E> 
- Direct Known Subclasses:
- VisualVertexRenderer,- VisualVertexSatelliteRenderer
public class AbstractVisualVertexRenderer<V extends VisualVertex,E extends VisualEdge<V>> 
extends edu.uci.ics.jung.visualization.renderers.BasicVertexRenderer<V,E> 
A base renderer class to define shared logic needed to render a vertex
- 
Nested Class SummaryNested classes/interfaces inherited from interface edu.uci.ics.jung.visualization.renderers.Renderer.Vertexedu.uci.ics.jung.visualization.renderers.Renderer.Vertex.NOOP
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected doubleadjustValueForCurrentScale(edu.uci.ics.jung.visualization.RenderContext<V, E> rc, double value, double ratioToScale) Adjusts the given value based upon the current scale applied to the view.protected ShapegetCompactShape(edu.uci.ics.jung.visualization.RenderContext<V, E> rc, edu.uci.ics.jung.algorithms.layout.Layout<V, E> layout, V vertex) Uses the render context to create a compact shape for the given vertexprotected edu.uci.ics.jung.visualization.transform.shape.GraphicsDecoratorgetEmphasisGraphics(edu.uci.ics.jung.visualization.transform.shape.GraphicsDecorator g, V vertex, edu.uci.ics.jung.visualization.RenderContext<V, E> rc, edu.uci.ics.jung.algorithms.layout.Layout<V, E> layout) Creates a copy of the givenGraphicsDecoratorthat may have scaling tweaked to handleVisualVertex.getEmphasis()emphasized vertices.getFullShape(edu.uci.ics.jung.visualization.RenderContext<V, E> rc, edu.uci.ics.jung.algorithms.layout.Layout<V, E> layout, V vertex) Uses the render context to create a compact shape for the given vertexprotected doubleprotected booleanisScaledPastVertexInteractionThreshold(edu.uci.ics.jung.visualization.RenderContext<V, E> rc) Returns true if the view is zoomed far enough out that the user cannot interact with its internal UI widgetsprotected voidpaintDropShadow(edu.uci.ics.jung.visualization.RenderContext<V, E> rc, edu.uci.ics.jung.visualization.transform.shape.GraphicsDecorator g, Shape shape) protected voidpaintHighlight(edu.uci.ics.jung.visualization.RenderContext<V, E> rc, V vertex, edu.uci.ics.jung.visualization.transform.shape.GraphicsDecorator g, Rectangle bounds) voidsetVertexFillPaintTransformer(com.google.common.base.Function<? super V, Paint> transformer) Sets the optional transformer used to convert a vertex into a colorprotected ShapetransformFromLayoutToView(edu.uci.ics.jung.visualization.RenderContext<V, E> rc, edu.uci.ics.jung.algorithms.layout.Layout<V, E> layout, V vertex, Shape shape) Takes the given shape and translates its coordinates to the view spaceMethods inherited from class edu.uci.ics.jung.visualization.renderers.BasicVertexRendererpaintIconForVertex, paintShapeForVertex, paintVertex, prepareFinalVertexShape, vertexHit
- 
Constructor Details- 
AbstractVisualVertexRendererpublic AbstractVisualVertexRenderer()
 
- 
- 
Method Details- 
setVertexFillPaintTransformerpublic void setVertexFillPaintTransformer(com.google.common.base.Function<? super V, Paint> transformer) Sets the optional transformer used to convert a vertex into a color- Parameters:
- transformer- the transformer
 
- 
getVertexFillPaintTransformer
- 
getEmphasisGraphicsprotected edu.uci.ics.jung.visualization.transform.shape.GraphicsDecorator getEmphasisGraphics(edu.uci.ics.jung.visualization.transform.shape.GraphicsDecorator g, V vertex, edu.uci.ics.jung.visualization.RenderContext<V, E> rc, edu.uci.ics.jung.algorithms.layout.Layout<V, E> layout) Creates a copy of the givenGraphicsDecoratorthat may have scaling tweaked to handleVisualVertex.getEmphasis()emphasized vertices.- Parameters:
- g- the graphics
- vertex- the vertex
- rc- the render context
- layout- the graph layout
- Returns:
- the new graphics
 
- 
paintHighlight
- 
paintDropShadow
- 
isScaledPastVertexInteractionThresholdprotected boolean isScaledPastVertexInteractionThreshold(edu.uci.ics.jung.visualization.RenderContext<V, E> rc) Returns true if the view is zoomed far enough out that the user cannot interact with its internal UI widgets- Parameters:
- rc- the render context
- Returns:
- true if the vertex is scaled past the interaction threshold
 
- 
getCompactShapeprotected Shape getCompactShape(edu.uci.ics.jung.visualization.RenderContext<V, E> rc, edu.uci.ics.jung.algorithms.layout.Layout<V, E> layout, V vertex) Uses the render context to create a compact shape for the given vertex- Parameters:
- rc- the render context
- layout- the layout
- vertex- the vertex
- Returns:
- the vertex shape
- See Also:
 
- 
getFullShapepublic Shape getFullShape(edu.uci.ics.jung.visualization.RenderContext<V, E> rc, edu.uci.ics.jung.algorithms.layout.Layout<V, E> layout, V vertex) Uses the render context to create a compact shape for the given vertex- Parameters:
- rc- the render context
- layout- the layout
- vertex- the vertex
- Returns:
- the vertex shape
- See Also:
 
- 
transformFromLayoutToViewprotected Shape transformFromLayoutToView(edu.uci.ics.jung.visualization.RenderContext<V, E> rc, edu.uci.ics.jung.algorithms.layout.Layout<V, E> layout, V vertex, Shape shape) Takes the given shape and translates its coordinates to the view space- Parameters:
- rc- the render context
- layout- the model space layout
- vertex- the vertex
- shape- the shape to translate
- Returns:
- the new shape
 
- 
adjustValueForCurrentScaleprotected double adjustValueForCurrentScale(edu.uci.ics.jung.visualization.RenderContext<V, E> rc, double value, double ratioToScale) Adjusts the given value based upon the current scale applied to the view. The more scaled out the view, the larger the value returned. This allows view effects to be discernable at scale.- Parameters:
- rc- the render context
- value- the value to scale
- ratioToScale- the ratio to scale to
- Returns:
- the scaled value
 
- 
getScale
 
-