public class GridElement extends AbstractTableElement implements TableElement, java.io.Serializable
CLASS| Constructor and Description |
|---|
GridElement()
Creates a new empty grid.
|
| 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.
|
boolean |
equals(java.lang.Object obj)
Tests this element for equality with an arbitrary object.
|
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,
java.util.Map<java.lang.String,java.lang.Object> constraints)
Returns the preferred size of the element (including insets).
|
void |
receive(TableElementVisitor visitor)
Receives a visitor by calling the visitor's
visit() method
for each of the children in the grid, and finally for the grid itself. |
void |
setElement(TableElement element,
java.lang.Comparable<?> rowKey,
java.lang.Comparable<?> columnKey)
Adds (or updates) a cell in the grid.
|
java.lang.String |
toString()
Returns a string representation of this element, primarily for
debugging purposes.
|
getBackground, getInsets, getProperty, getRefPoint, getTag, preferredSize, setBackground, setBackgroundColor, setInsets, setProperty, setRefPoint, setTagclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetProperty, getRefPoint, preferredSize, setPropertypublic GridElement()
public void setElement(TableElement element, java.lang.Comparable<?> rowKey, java.lang.Comparable<?> columnKey)
element - the element (null permitted).rowKey - the row key (null not permitted).columnKey - the column key (null not permitted).public void receive(TableElementVisitor visitor)
visit() method
for each of the children in the grid, and finally for the grid itself.receive in interface TableElementvisitor - the visitor (null not permitted).public java.awt.geom.Dimension2D preferredSize(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D bounds, java.util.Map<java.lang.String,java.lang.Object> constraints)
preferredSize in interface TableElementpreferredSize in class AbstractTableElementg2 - the graphics target.bounds - the bounds.constraints - the constraints (ignored for now).public 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)
layoutElements in interface TableElementg2 - the graphics target.bounds - the bounds.constraints - the constraints (if any).public void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D bounds)
draw in interface TableElementg2 - the graphics target.bounds - the bounds.public void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D bounds, TableElementOnDraw onDrawHandler)
recordBounds flag is set, this element and each of its
children will have their BOUNDS_2D property updated with
the current bounds.draw in interface TableElementg2 - 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).public boolean equals(java.lang.Object obj)
equals in class AbstractTableElementobj - the object (null permitted).public java.lang.String toString()
toString in class java.lang.Object