com.rapidminer.gui.graphs
Class TreeModelNodeLabelRenderer<V,E>

java.lang.Object
  extended by com.rapidminer.gui.graphs.TreeModelNodeLabelRenderer<V,E>
Type Parameters:
V - the type for vertices
E - the type for edges
All Implemented Interfaces:
edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel<V,E>

public class TreeModelNodeLabelRenderer<V,E>
extends java.lang.Object
implements edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel<V,E>

This renderer is used for rendering the labels of the tree model nodes.

Author:
Ingo Mierswa

Nested Class Summary
static class TreeModelNodeLabelRenderer.InsidePositioner
          Used for positioning the label inside of a node,
static class TreeModelNodeLabelRenderer.OutsidePositioner
          Used for positioning the label outside of a node,
 
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
 
Field Summary
protected  edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Position position
           
 
Constructor Summary
TreeModelNodeLabelRenderer(TreeModelGraphCreator graphCreator)
           
 
Method Summary
protected  java.awt.Point getAnchorPoint(java.awt.geom.Rectangle2D vertexBounds, java.awt.Dimension labelSize, edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Position position)
           
 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<V,E> rc, edu.uci.ics.jung.algorithms.layout.Layout<V,E> layout, V v, java.lang.String label)
          Labels the specified vertex with the specified label.
 java.awt.Component prepareRenderer(edu.uci.ics.jung.visualization.RenderContext<V,E> rc, edu.uci.ics.jung.visualization.renderers.VertexLabelRenderer graphLabelRenderer, java.lang.Object value, boolean isSelected, V 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

position

protected edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Position position
Constructor Detail

TreeModelNodeLabelRenderer

public TreeModelNodeLabelRenderer(TreeModelGraphCreator graphCreator)
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<V,E>
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<V,E>
Parameters:
position - the position to set

prepareRenderer

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

labelVertex

public void labelVertex(edu.uci.ics.jung.visualization.RenderContext<V,E> rc,
                        edu.uci.ics.jung.algorithms.layout.Layout<V,E> layout,
                        V 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<V,E>

getAnchorPoint

protected java.awt.Point getAnchorPoint(java.awt.geom.Rectangle2D vertexBounds,
                                        java.awt.Dimension labelSize,
                                        edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Position position)

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<V,E>
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<V,E>
Parameters:
positioner - the positioner to set


Copyright © 2001-2009 by Rapid-I