public interface Renderer
Modifier and Type | Field and Description |
---|---|
static java.awt.Graphics2D |
DEFAULT_GRAPHICS
Provides a default graphics context for renderers to do useful
things like compute string widths when an external graphics context
has not yet been provided.
|
Modifier and Type | Method and Description |
---|---|
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.
|
static final java.awt.Graphics2D DEFAULT_GRAPHICS
void render(java.awt.Graphics2D g, VisualItem item)
g
- the Graphics2D contextitem
- the visual item to drawboolean locatePoint(java.awt.geom.Point2D p, VisualItem item)
p
- the point to test for containmentitem
- the item to test containment againstvoid setBounds(VisualItem item)
item
- the item to compute the bounding box forCopyright ? 2013 Regents of the University of California