public interface TableElement
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS
A property key for the class of a table element.
|
| Modifier and Type | Method and Description |
|---|---|
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D bounds)
Draws the element within the specified bounds.
|
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D bounds,
TableElementOnDraw onDrawHandler)
Draws the element within the specified bounds.
|
java.lang.Object |
getProperty(java.lang.String key)
Returns the value of the property with the specified key, or
null. |
RefPt2D |
getRefPoint()
Returns the reference point used to align the element with the bounding
rectangle within which it is drawn.
|
java.util.List<java.awt.geom.Rectangle2D> |
layoutElements(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D bounds,
java.util.Map<java.lang.String,java.lang.Object> constraints)
Performs a layout of this table element, returning a list of bounding
rectangles for the element and its subelements.
|
java.awt.geom.Dimension2D |
preferredSize(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D bounds)
Calculates the preferred size for the element, with reference to the
specified bounds.
|
java.awt.geom.Dimension2D |
preferredSize(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D bounds,
java.util.Map<java.lang.String,java.lang.Object> constraints)
Returns the preferred size of the element, subject to the supplied
constraints.
|
void |
receive(TableElementVisitor visitor)
Receives a
TableElementVisitor. |
void |
setProperty(java.lang.String key,
java.lang.Object value)
Sets the value of the property with the specified key.
|
static final java.lang.String CLASS
java.awt.geom.Dimension2D preferredSize(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D bounds)
FlowElement, the width of the bounds will
determine when the flow layout wraps.g2 - the graphics target (null not permitted).bounds - the bounds (null not permitted).null).java.awt.geom.Dimension2D preferredSize(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D bounds, java.util.Map<java.lang.String,java.lang.Object> constraints)
g2 - the graphics target (null not permitted).bounds - the bounds (null not permitted).constraints - the constraints (null permitted).RefPt2D getRefPoint()
null).java.util.List<java.awt.geom.Rectangle2D> layoutElements(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D bounds, java.util.Map<java.lang.String,java.lang.Object> constraints)
draw(java.awt.Graphics2D,
java.awt.geom.Rectangle2D) method.g2 - the graphics target (null not permitted).bounds - the bounds (null not permitted).constraints - the constraints (if any).void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D bounds)
g2 - the graphics target (null not permitted).bounds - the bounds (null not permitted).void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D bounds, TableElementOnDraw onDrawHandler)
onDrawHandler provides (optional) access to all elements
before and after they are rendered.g2 - the graphics target (null not permitted).bounds - the bounds (null not permitted).onDrawHandler - an object that will receive notification before
and after the element is drawn (null permitted).java.lang.Object getProperty(java.lang.String key)
null.key - the key (null not permitted).null.void setProperty(java.lang.String key, java.lang.Object value)
key - the key (null not permitted).value - the value (null permitted).void receive(TableElementVisitor visitor)
TableElementVisitor. The visitor will have its
visit(TableElement) method called for each child element
of this table element (if it has children) and then for this element.visitor - the visitor (null not permitted).