ca.utoronto.cs.prefuseextensions.render
Class DecoratorLabelRenderer

java.lang.Object
  extended by prefuse.render.AbstractShapeRenderer
      extended by ca.utoronto.cs.prefuseextensions.render.RotationLabelRenderer
          extended by ca.utoronto.cs.prefuseextensions.render.DecoratorLabelRenderer
All Implemented Interfaces:
prefuse.render.Renderer

public class DecoratorLabelRenderer
extends ca.utoronto.cs.prefuseextensions.render.RotationLabelRenderer

Renders a decorator item if the specified label will fit within the bounds of the decorated node.

Version:
1.1
Author:
Christopher Collins

Field Summary
 
Fields inherited from class prefuse.render.AbstractShapeRenderer
RENDER_TYPE_DRAW, RENDER_TYPE_DRAW_AND_FILL, RENDER_TYPE_FILL, RENDER_TYPE_NONE
 
Fields inherited from interface prefuse.render.Renderer
DEFAULT_GRAPHICS
 
Constructor Summary
DecoratorLabelRenderer()
           
DecoratorLabelRenderer(java.lang.String string, boolean restrictToBounds)
          An extension of RotationLabelRenderer that only displays labels if they fit within node boundaries.
DecoratorLabelRenderer(java.lang.String string, boolean restrictToBounds, double minimumRenderSize)
          An extension of RotationLabelRenderer that only displays labels if they fit within node boundaries.
 
Method Summary
 void render(java.awt.Graphics2D g, prefuse.visual.VisualItem item)
          Only render labels that fit within their assigned shape.
 
Methods inherited from class ca.utoronto.cs.prefuseextensions.render.RotationLabelRenderer
getHorizontalAlignment, getHorizontalImageAlignment, getHorizontalPadding, getHorizontalTextAlignment, getImageFactory, getImageField, getImagePosition, getImageTextPadding, getTextField, getVerticalAlignment, getVerticalImageAlignment, getVerticalPadding, getVerticalTextAlignment, setHorizontalAlignment, setHorizontalImageAlignment, setHorizontalPadding, setHorizontalTextAlignment, setImageFactory, setImageField, setImagePosition, setImageTextPadding, setMaxImageDimensions, setMaxTextWidth, setRoundedCorner, setTextField, setVerticalAlignment, setVerticalImageAlignment, setVerticalPadding, setVerticalTextAlignment
 
Methods inherited from class prefuse.render.AbstractShapeRenderer
getRenderType, getShape, locatePoint, setBounds, setManageBounds, setRenderType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecoratorLabelRenderer

public DecoratorLabelRenderer()

DecoratorLabelRenderer

public DecoratorLabelRenderer(java.lang.String string,
                              boolean restrictToBounds,
                              double minimumRenderSize)
An extension of RotationLabelRenderer that only displays labels if they fit within node boundaries. Labels that are too large are omitted.

Parameters:
string - the label string to try
restrictToBounds -

DecoratorLabelRenderer

public DecoratorLabelRenderer(java.lang.String string,
                              boolean restrictToBounds)
An extension of RotationLabelRenderer that only displays labels if they fit within node boundaries. Labels that are too large are omitted.

Parameters:
string - the label string to try
restrictToBounds -
Method Detail

render

public void render(java.awt.Graphics2D g,
                   prefuse.visual.VisualItem item)
Only render labels that fit within their assigned shape.

Specified by:
render in interface prefuse.render.Renderer
Overrides:
render in class ca.utoronto.cs.prefuseextensions.render.RotationLabelRenderer
See Also:
Renderer.render(java.awt.Graphics2D, prefuse.visual.VisualItem)