bicliqueviz
Class CustomVertexLabelRenderer

java.lang.Object
  extended by bicliqueviz.CustomVertexLabelRenderer
All Implemented Interfaces:
edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel<VertexObj,EdgeObj>

public class CustomVertexLabelRenderer
extends java.lang.Object
implements edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel<VertexObj,EdgeObj>

Class for custom vertex label rendering

Author:
Martin Schwartz

Nested Class Summary
static class CustomVertexLabelRenderer.InsidePositioner
           
static class CustomVertexLabelRenderer.OutsidePositioner
           
 
Nested classes/interfaces inherited from interface edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel
edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.NOOP, edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Position, edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Positioner
 
Constructor Summary
CustomVertexLabelRenderer()
           
CustomVertexLabelRenderer(edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Position position)
           
 
Method Summary
 edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Position getPosition()
           
 edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Positioner getPositioner()
           
 void labelVertex(edu.uci.ics.jung.visualization.RenderContext<VertexObj,EdgeObj> rc, edu.uci.ics.jung.algorithms.layout.Layout<VertexObj,EdgeObj> layout, VertexObj v, java.lang.String label)
          Labels the specified vertex with the specified label.
 java.awt.Component prepareRenderer(edu.uci.ics.jung.visualization.RenderContext<VertexObj,EdgeObj> rc, edu.uci.ics.jung.visualization.VertexLabelRenderer graphLabelRenderer, java.lang.Object value, boolean isSelected, VertexObj vertex)
           
 void setPosition(edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Position position)
           
 void setPositioner(edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Positioner positioner)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomVertexLabelRenderer

public CustomVertexLabelRenderer()

CustomVertexLabelRenderer

public CustomVertexLabelRenderer(edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Position position)
Parameters:
position -
Method Detail

getPosition

public edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Position getPosition()
Specified by:
getPosition in interface edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel<VertexObj,EdgeObj>
Returns:
the position

setPosition

public void setPosition(edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Position position)
Specified by:
setPosition in interface edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel<VertexObj,EdgeObj>
Parameters:
position - the position to set

prepareRenderer

public java.awt.Component prepareRenderer(edu.uci.ics.jung.visualization.RenderContext<VertexObj,EdgeObj> rc,
                                          edu.uci.ics.jung.visualization.VertexLabelRenderer graphLabelRenderer,
                                          java.lang.Object value,
                                          boolean isSelected,
                                          VertexObj vertex)

labelVertex

public void labelVertex(edu.uci.ics.jung.visualization.RenderContext<VertexObj,EdgeObj> rc,
                        edu.uci.ics.jung.algorithms.layout.Layout<VertexObj,EdgeObj> layout,
                        VertexObj v,
                        java.lang.String label)
Labels the specified vertex with the specified label. Uses the font specified by this instance's VertexFontFunction. (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:
labelVertex in interface edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel<VertexObj,EdgeObj>

getPositioner

public edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Positioner getPositioner()
Specified by:
getPositioner in interface edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel<VertexObj,EdgeObj>
Returns:
the positioner

setPositioner

public void setPositioner(edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Positioner positioner)
Specified by:
setPositioner in interface edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel<VertexObj,EdgeObj>
Parameters:
positioner - the positioner to set