prefuse.render
Class NullRenderer

java.lang.Object
  extended by 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

Field Summary
 
Fields inherited from interface prefuse.render.Renderer
DEFAULT_GRAPHICS
 
Constructor Summary
NullRenderer()
           
 
Method Summary
 boolean locatePoint(java.awt.geom.Point2D p, VisualItem item)
          Returns true if the Point is located inside the extents of the item.
 void render(java.awt.Graphics2D g, VisualItem item)
          Render item into a Graphics2D context.
 void setBounds(VisualItem item)
          Calculates and sets the bounding rectangle for an item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullRenderer

public NullRenderer()
Method Detail

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 context
item - 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 exaxt 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 containment
item - 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)

setBounds

public void setBounds(VisualItem item)
Description copied from interface: Renderer
Calculates and sets the bounding rectangle for an item. This is called by a VisualItem when it validates its bounds.

Specified by:
setBounds in interface Renderer
Parameters:
item - the item to compute the bounding box for
See Also:
Renderer.setBounds(prefuse.visual.VisualItem)


Copyright © 2007 Regents of the University of California