org.mortbay.html
public class Table extends Block
The Table Element works by calling newRow and then adding cells or headings.
Notes
Tables are implemented by nesting a cell Block within a row Block
within the table which is also a Block (see nest() on class Composite).
Once a row and cell have been created, calling add or attributes on
the table actually calls the cell.
See Also: Element
| Constructor Summary | |
|---|---|
| Table() Construct Table. | |
| Table(int border) Construct Table. | |
| Table(int border, String attributes) Construct Table with attributes. | |
| Method Summary | |
|---|---|
| Table | addCell(Object o) |
| Table | addCell(Object o, String attributes) |
| Table | addHeading(Object o) |
| Table | addHeading(Object o, String attributes) |
| Block | cell() Get the current cell Block element.
|
| Table | cellPadding(int padding) Set the table cell padding. |
| Table | cellSpacing(int s) Set the table cell spacing. |
| Block | defaultCell() Access the default cell template.
|
| Block | defaultHead() Access the default header cell template.
|
| Block | defaultRow() Access the default row template.
|
| Table | newCell() |
| Table | newCell(String attributes) |
| Table | newHeading() |
| Table | newRow() Create new table row.
|
| Table | newRow(String attributes) Create new table row with attributes.
|
| Block | row() Get the current row Block element.
|
| static void | setCellNestingFactory(CompositeFactory factory) Add cell nesting factory.
|
| void | setNestingFactory(CompositeFactory factory) Add cell nesting factory for table.
|
| static void | setThreadNestingFactory(CompositeFactory factory) Add cell nesting factory for thread.
|
| Table | spacing(int h, int v) Set horizontal and vertical spacing. |
Returns: The Block instance which has been nested in the row as the cell
Parameters: padding the cell padding in pixels
Returns: This table for call chaining
Parameters: s spacing in pixels
Returns: This table for call chaining
Returns: The default cell template
Returns: The default head cell template
Returns: The default row template
Returns: The Block instance which has been nested in the table as the row
Deprecated: Use setNestingFactory or setThreadNestingFactory
Add cell nesting factory. Set the CompositeFactory for this thread. Each new cell in the table added by this thread will have a new Composite from this factory nested in the Cell.Parameters: factory The factory for this Thread. If null clear this threads factory.
Parameters: factory The factory for this Thread. If null clear this threads factory.
Parameters: factory The factory for this Thread. If null clear this threads factory.
Parameters: h horizontal spacing v vertical spacing
Returns: This table for call chaining