Class AbstractVertexRenderer<V,E>
- java.lang.Object
-
- org.jungrapht.visualization.renderers.AbstractVertexRenderer<V,E>
-
- Type Parameters:
V
- vertex typeE
- edge type
- All Implemented Interfaces:
Renderer.Vertex<V,E>
- Direct Known Subclasses:
HeavyweightVertexRenderer
,LightweightVertexRenderer
public abstract class AbstractVertexRenderer<V,E> extends Object implements Renderer.Vertex<V,E>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jungrapht.visualization.renderers.Renderer.Vertex
Renderer.Vertex.NOOP<V,E>
-
-
Constructor Summary
Constructors Constructor Description AbstractVertexRenderer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Shape
getVertexShape(RenderContext<V,E> renderContext, V vertex)
LightweightVertexRenderer overrides to provide a lightweight shape HeavyweightVertexRenderer uses the configured vertexShapeFunctionprotected abstract void
paintIconForVertex(RenderContext<V,E> renderContext, LayoutModel<V> layoutModel, V v)
protected void
paintShapeForVertex(RenderContext<V,E> renderContext, V v, Shape shape)
void
paintVertex(RenderContext<V,E> renderContext, LayoutModel<V> layoutModel, V v)
protected Shape
prepareFinalVertexShape(RenderContext<V,E> renderContext, LayoutModel<V> layoutModel, V v, int[] coords)
Returns the vertex shape in layout coordinates.
-
-
-
Method Detail
-
paintVertex
public void paintVertex(RenderContext<V,E> renderContext, LayoutModel<V> layoutModel, V v)
- Specified by:
paintVertex
in interfaceRenderer.Vertex<V,E>
-
getVertexShape
protected abstract Shape getVertexShape(RenderContext<V,E> renderContext, V vertex)
LightweightVertexRenderer overrides to provide a lightweight shape HeavyweightVertexRenderer uses the configured vertexShapeFunction- Parameters:
renderContext
-vertex
-- Returns:
-
prepareFinalVertexShape
protected Shape prepareFinalVertexShape(RenderContext<V,E> renderContext, LayoutModel<V> layoutModel, V v, int[] coords)
Returns the vertex shape in layout coordinates.- Parameters:
v
- the vertex whose shape is to be returnedcoords
- the x and y view coordinates. used by caller to place the icon if available- Returns:
- the vertex shape in view coordinates
-
paintShapeForVertex
protected void paintShapeForVertex(RenderContext<V,E> renderContext, V v, Shape shape)
-
paintIconForVertex
protected abstract void paintIconForVertex(RenderContext<V,E> renderContext, LayoutModel<V> layoutModel, V v)
-
-