|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Renderer
Interface for rendering VisualItems, providing drawing as well as location checking and bounding box routines.
Field Summary | |
---|---|
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. |
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. |
Field Detail |
---|
static final java.awt.Graphics2D DEFAULT_GRAPHICS
Method Detail |
---|
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 against
void calculateBounds(VisualItem<?> item, java.awt.geom.Rectangle2D bounds)
item
- the item to compute the bounding box forbounds
- the rectangle to populate with the bounding boxboolean managesBounds()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |