ca.utoronto.cs.prefuseextensions.render
Class DecoratorLabelRenderer
java.lang.Object
prefuse.render.AbstractShapeRenderer
ca.utoronto.cs.prefuseextensions.render.RotationLabelRenderer
ca.utoronto.cs.prefuseextensions.render.DecoratorLabelRenderer
- All Implemented Interfaces:
- prefuse.render.Renderer
public class DecoratorLabelRenderer
- extends RotationLabelRenderer
Renders a decorator item if the specified label will fit within the bounds of the
decorated node.
- Version:
- 1.0
- Author:
- Christopher Collins
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 boundries. |
DecoratorLabelRenderer(java.lang.String string,
boolean restrictToBounds,
double minimumRenderSize)
An extension of RotationLabelRenderer that only displays labels if they fit within
node boundries. |
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 |
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 boundries. Labels that are too large are omitted.
- Parameters:
string
- the label string to tryrestrictToBounds
-
DecoratorLabelRenderer
public DecoratorLabelRenderer(java.lang.String string,
boolean restrictToBounds)
- An extension of RotationLabelRenderer that only displays labels if they fit within
node boundries. Labels that are too large are ommitted.
- Parameters:
string
- the label string to tryrestrictToBounds
- minimumRenderSize
- do not render text with height lower than this point size
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 RotationLabelRenderer
- See Also:
Renderer.render(java.awt.Graphics2D, prefuse.visual.VisualItem)