Class BasicVertexLabelRenderer<V,E>
java.lang.Object
edu.uci.ics.jung.visualization.renderers.BasicVertexLabelRenderer<V,E>
- All Implemented Interfaces:
Renderer.VertexLabel<V,E>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested classes/interfaces inherited from interface edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel
Renderer.VertexLabel.NOOP, Renderer.VertexLabel.Position, Renderer.VertexLabel.Positioner -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionprotected PointgetAnchorPoint(Rectangle2D vertexBounds, Dimension labelSize, Renderer.VertexLabel.Position position) voidlabelVertex(RenderContext<V, E> rc, Layout<V, E> layout, V v, String label) Labels the specified vertex with the specified label.prepareRenderer(RenderContext<V, E> rc, VertexLabelRenderer graphLabelRenderer, Object value, boolean isSelected, V vertex) voidsetPosition(Renderer.VertexLabel.Position position) voidsetPositioner(Renderer.VertexLabel.Positioner positioner)
-
Field Details
-
position
-
-
Constructor Details
-
BasicVertexLabelRenderer
public BasicVertexLabelRenderer() -
BasicVertexLabelRenderer
-
-
Method Details
-
getPosition
- Specified by:
getPositionin interfaceRenderer.VertexLabel<V,E> - Returns:
- the position
-
setPosition
- Specified by:
setPositionin interfaceRenderer.VertexLabel<V,E> - Parameters:
position- the position to set
-
prepareRenderer
public Component prepareRenderer(RenderContext<V, E> rc, VertexLabelRenderer graphLabelRenderer, Object value, boolean isSelected, V vertex) -
labelVertex
Labels the specified vertex with the specified label. Uses the font specified by this instance'sVertexFontFunction. (If the font is unspecified, the existing font for the graphics context is used.) If vertex label centering is active, the label is centered on the position of the vertex; otherwise the label is offset slightly.- Specified by:
labelVertexin interfaceRenderer.VertexLabel<V,E>
-
getAnchorPoint
protected Point getAnchorPoint(Rectangle2D vertexBounds, Dimension labelSize, Renderer.VertexLabel.Position position) -
getPositioner
- Specified by:
getPositionerin interfaceRenderer.VertexLabel<V,E> - Returns:
- the positioner
-
setPositioner
- Specified by:
setPositionerin interfaceRenderer.VertexLabel<V,E> - Parameters:
positioner- the positioner to set
-