All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----com.sun.java.swing.text.View | +----com.sun.java.swing.text.CompositeView | +----com.sun.java.swing.text.BoxView | +----com.sun.java.swing.text.TableView
Implements View interface for a table, that is composed of a specific element structure where the child elements of the element this view is responsible for represent rows and the child elements of the row elements are cells. The cell elements can have an arbitrary element structure under them.
TABLE
ROW
CELL
CELL
ROW
CELL
CELL
This is implemented as a hierarchy of boxes, the table itself is a vertical box, the rows are horizontal boxes, and the cells are vertical boxes. The cells are allowed to span multiple columns and rows. By default, the table can be thought of as being formed over a grid, where cells can request to span more than one grid cell. The default horizontal span of table cells will be based upon this grid, but can be changed by reimplementing the requested span of the cell.
public TableView(Element elem)
protected TableView. TableRow createTableRow(Element elem)
protected TableView. TableCell createTableCell(Element elem)
protected void loadChildren(ViewFactory f)
setParent
method.
This is reimplemented to build rows using the
createTableRow
method and then
proxy cell entries for each of the cells that
span multiple columns or rows, substantially
reducing the complexity of the layout calculations.
protected void layout(int width, int height)
All Packages Class Hierarchy This Package Previous Next Index