prefuse.render
Class CompositeRenderer

java.lang.Object
  extended by prefuse.render.CompositeRenderer
All Implemented Interfaces:
Renderer

public class CompositeRenderer
extends java.lang.Object
implements Renderer

Author:
Anton Marsden

Field Summary
 
Fields inherited from interface prefuse.render.Renderer
DEFAULT_GRAPHICS
 
Constructor Summary
CompositeRenderer(Renderer interactiveRenderer, Renderer supportingRenderer)
           
 
Method Summary
 void calculateBounds(VisualItem<?> item, java.awt.geom.Rectangle2D bounds)
          Calculates the bounding rectangle for an item.
 Renderer getInteractiveRenderer()
           
 Renderer getSupportingRenderer()
           
 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
 

Constructor Detail

CompositeRenderer

public CompositeRenderer(Renderer interactiveRenderer,
                         Renderer supportingRenderer)
Method Detail

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 containment
item - the item to test containment against
Returns:
true if the point is contained within the the item, else false

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

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 for
bounds - the rectangle to populate with the bounding box

getInteractiveRenderer

public Renderer getInteractiveRenderer()

getSupportingRenderer

public Renderer getSupportingRenderer()

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