prefuse.render
Class NullRenderer
java.lang.Object
prefuse.render.NullRenderer
- All Implemented Interfaces:
- Renderer
public class NullRenderer
- extends java.lang.Object
- implements Renderer
Renderer that does nothing, causing an item to be rendered "into
the void". Possibly useful for items that must exist and have a spatial
location but should otherwise be invisible and non-interactive (e.g.,
invisible end-points for visible edges).
- Author:
- jeffrey heer
Method Summary |
void |
calculateBounds(VisualItem<?> item,
java.awt.geom.Rectangle2D bounds)
Calculates the bounding rectangle for an item. |
boolean |
locatePoint(java.awt.geom.Point2D p,
VisualItem<?> item)
Returns true if the Point is located inside the extents of the item. |
boolean |
managesBounds()
|
void |
render(java.awt.Graphics2D g,
VisualItem<?> item)
Render item into a Graphics2D context. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NullRenderer
public NullRenderer()
render
public void render(java.awt.Graphics2D g,
VisualItem<?> item)
- Description copied from interface:
Renderer
- Render item into a Graphics2D context.
- Specified by:
render
in interface Renderer
- Parameters:
g
- the Graphics2D contextitem
- the visual item to draw- See Also:
Renderer.render(java.awt.Graphics2D, prefuse.visual.VisualItem)
locatePoint
public boolean locatePoint(java.awt.geom.Point2D p,
VisualItem<?> item)
- Description copied from interface:
Renderer
- Returns true if the Point is located inside the extents of the item.
This calculation matches against the exact item shape, and so is more
sensitive than just checking within a bounding box.
- Specified by:
locatePoint
in interface Renderer
- Parameters:
p
- the point to test for containmentitem
- the item to test containment against
- Returns:
- true if the point is contained within the the item, else false
- See Also:
Renderer.locatePoint(java.awt.geom.Point2D, prefuse.visual.VisualItem)
calculateBounds
public void calculateBounds(VisualItem<?> item,
java.awt.geom.Rectangle2D bounds)
- Description copied from interface:
Renderer
- Calculates the bounding rectangle for an item. This is called
by a VisualItem when it validates its bounds.
- Specified by:
calculateBounds
in interface Renderer
- Parameters:
item
- the item to compute the bounding box forbounds
- the rectangle to populate with the bounding box- See Also:
Renderer.calculateBounds(VisualItem,Rectangle2D)
managesBounds
public boolean managesBounds()
- Specified by:
managesBounds
in interface Renderer
- Returns:
- true if and only if the renderer manages the bounds of the items it renders
Copyright © 2008 Regents of the University of California