|
PAJES 3.0.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pajes.html.Tag
org.pajes.html.TraversableElement
org.pajes.html.Container
org.pajes.html.TableContainer
org.pajes.html.Table
public class Table
This class generates the TABLE and /TABLE tags. A
table contains a series of rows. Each row contains a series of columns.
| Nested Class Summary | |
|---|---|
class |
Table.Body
Inner class representing the body of the table. |
class |
Table.Cell
Inner class representing a cell within the table. |
class |
Table.Column
Inner class representing a column layout. |
class |
Table.ColumnGroup
Inner class representing a column layout group. |
class |
Table.Foot
Inner class representing the footer rows of the table. |
class |
Table.Head
Inner class representing the header rows of the table. |
class |
Table.HeadingCell
Inner class representing a heading cell within the table. |
class |
Table.Row
Inner class representing a row within the table. |
protected class |
Table.RowContainer
Abstract super-class of all body sections that contain rows. |
| Field Summary |
|---|
| Fields inherited from class org.pajes.html.Tag |
|---|
ON_CLICK_ATTRIBUTE, TAG_CLOSE, TAG_LEFT, TAG_RIGHT |
| Constructor Summary | |
|---|---|
Table()
Creates an HTML table. |
|
Table(java.lang.String align)
Creates an HTML table. |
|
Table(java.lang.String align,
java.lang.String width)
Creates an HTML table. |
|
Table(java.lang.String align,
java.lang.String width,
Color backgroundColor)
Creates an HTML table. |
|
Table(java.lang.String align,
java.lang.String width,
Color backgroundColor,
int columns)
Creates an HTML table. |
|
Table(java.lang.String align,
java.lang.String width,
int columns)
Creates an HTML table. |
|
Table(java.lang.String align,
java.lang.String width,
int borderWidth,
int cellPadding,
int cellSpacing)
Creates an HTML table. |
|
Table(java.lang.String align,
java.lang.String width,
int borderWidth,
int cellPadding,
int cellSpacing,
int columns)
Creates an HTML table. |
|
| Method Summary | |
|---|---|
Traversable |
add(HTML htmlObject)
Adds an HTML object to the current container |
Table.Body |
addBody()
Adds a new body section to the table. |
Table.Cell |
addCell(boolean content)
Adds a cell to the table. |
Table.Cell |
addCell(java.lang.Boolean content)
Adds a cell to the table. |
Table.Cell |
addCell(HTML content)
Adds a cell to the table. |
Table.Cell |
addCell(HTML content,
int columnsToSpan)
Adds a cell to the table. |
Table.Cell |
addCell(HTML content,
java.lang.String align)
Adds a cell to the table. |
Table.Cell |
addCell(HTML content,
java.lang.String align,
int columnsToSpan)
Adds a cell to the table. |
Table.Cell |
addCell(int content)
Adds a cell to the table. |
Table.Cell |
addCell(java.lang.String content)
Adds a cell to the table. |
Table.Cell |
addCell(java.lang.String content,
boolean bold,
java.lang.String align)
Adds a cell to the table. |
Table.Cell |
addCell(java.lang.String content,
int columnsToSpan)
Adds a cell to the table. |
Table.Cell |
addCell(java.lang.String content,
java.lang.String align)
Adds a cell to the table. |
Table.Cell |
addHeadingCell(HTML headingContent)
Adds a heading cell to the table. |
Table.Cell |
addHeadingCell(HTML headingContent,
int columnsToSpan)
Adds a heading cell to the table. |
Table.Cell |
addHeadingCell(HTML headingContent,
int columnsToSpan,
int rowsToSpan)
Adds a heading cell to the table. |
Table.Cell |
addHeadingCell(java.lang.String headingContent)
Adds a heading cell to the table. |
Table.Cell |
addHeadingCell(java.lang.String headingContent,
int columnsToSpan)
Adds a heading cell to the table. |
Table.Cell |
addHeadingCell(java.lang.String headingContent,
int columnsToSpan,
int rowsToSpan)
Adds a heading cell to the table. |
Table.Row |
addRow()
Adds a row into the table, or if a table body has been
added, then it is added to the last added body. |
java.lang.Object |
clone()
Allows a tag to be cloned. |
Table.Cell |
currentCell()
Returns a reference to the cell just added, or null if no cells have been added. |
Table.Row |
currentRow()
Returns a reference to the row just added, or null if no rows have been added. |
Table.Cell |
getCell(int row,
int col)
Returns the reference to the cell at the specified row and column position within the table body. |
Table.Foot |
getFooter()
Returns the footer section of the table. |
Table.Head |
getHeader()
Returns the header section of the table. |
Table.Cell |
getLogicalCell(int row,
int col)
Returns the reference to the cell at the specified logical row and column position (taking into account colspan and rowspan settings) within the table body. |
Table.Cell[][] |
getLogicalCellMap(boolean fill)
Returns a two-dimensional Cell array containing the table cells in their logical positions. |
int |
getMaxColumns()
Returns the maximum number of columns in each row of the table. |
Tag |
setAttribute(java.lang.String name,
java.lang.String value)
Adds a string attribute. |
Table |
setBackgroundImage(java.lang.String imageURL)
Sets the background image for the table. |
Table |
setBorderColor(Color color)
Sets the border colour for the table. |
Table |
setBorderWidth(int pixels)
Set the Border width for the table. |
Table |
setCellPadding(int pixels)
Cell Padding is the amount of empty space between the border of a table and the cell contents. |
Table |
setCellSpacing(int pixels)
Cell spacing is the amount of empty space between the outer edge of each table cell. |
Table |
setMaxColumns(int columns)
Sets the maximum number of columns in each row of the table. |
Table |
setSummary(java.lang.String summary)
Sets the table summary, which is used to aid non-visual browsers in displaying the table. |
void |
write(Browser browser)
Writes the tag to the browser. |
| Methods inherited from class org.pajes.html.TableContainer |
|---|
getTable, setAlignment, setAlignmentCenter, setAlignmentLeft, setAlignmentRight, setBGColor, setHeight, setHeight, setVerticalAlignment, setVerticalAlignmentBottom, setVerticalAlignmentMiddle, setVerticalAlignmentTop, setWidth, setWidth, writeContent |
| Methods inherited from class org.pajes.html.Container |
|---|
add, add, add, addContent, clear, delete, delete, destroy, get, getContent, getContents, getPosition, insert, replace, set, setContent, setContent, size |
| Methods inherited from class org.pajes.html.TraversableElement |
|---|
dump, dump, getAll, getFieldByName, getFirstFieldByName, getFirstTagByAttribute, getFirstTagByClass, getFirstTagByID, getFirstTagByName, getTagByAttribute, getTagByClass, getTagByID, getTagByName, setWritable |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.pajes.html.Traversable |
|---|
isWritable |
| Methods inherited from interface org.pajes.html.HTML |
|---|
getContainer, getDocument, getId, getParent, getWritePermission, isChildOf, isChildOf, setContainer, setParent, setWritePermission |
| Constructor Detail |
|---|
public Table()
public Table(java.lang.String align)
align - the alignment of the table (Left, Center, or Right).
public Table(java.lang.String align,
java.lang.String width)
align - the alignment of the table (Left, Center, or Right).width - the width of the table expressed in pixels or as a percent
("80%")
public Table(java.lang.String align,
java.lang.String width,
Color backgroundColor)
align - the alignment of the table (Left, Center, or Right).width - the width of the table expressed in pixels or as a percent
("80%")backgroundColor - the colour name or HTML RGB colour.
public Table(java.lang.String align,
java.lang.String width,
Color backgroundColor,
int columns)
align - the alignment of the table (Left, Center, or Right).width - the width of the table expressed in pixels or as a percent
("80%")backgroundColor - the colour name or HTML RGB colour.columns - the number of columns in the table. When set, a new row will
be automatically added as soon this number of columns is
reached in a row.
public Table(java.lang.String align,
java.lang.String width,
int columns)
align - the alignment of the table (Left,Center, or Right).width - the width of the table expressed in pixels or as a percent
("80%")columns - the number of columns in the table. When set, a new row will
be automatically added as soon this number of columns is
reached in a row.
public Table(java.lang.String align,
java.lang.String width,
int borderWidth,
int cellPadding,
int cellSpacing)
align - the alignment of the table (Left, Center, or Right).width - the width of the table expressed in pixels or as a percent
("80%")borderWidth - the width of the table and cell borders, expressed in pixels.cellPadding - the number of pixels between the edge of each cell and its
contents.cellSpacing - the number of pixels between adjacent cells and along the
outer edges of the cells along the edges of the table.
public Table(java.lang.String align,
java.lang.String width,
int borderWidth,
int cellPadding,
int cellSpacing,
int columns)
align - the alignment of the table (Left, Center, or Right).width - the width of the table expressed in pixels or as a percent
("80%")borderWidth - the width of the table and cell borders, expressed in pixels.cellPadding - the number of pixels between the edge of each cell and its
contents.cellSpacing - the number of pixels between adjacent cells and along the
outer edges of the cells along the edges of the table.columns - the number of columns in the table. When set, a new row will
be automatically added as soon this number of columns is
reached in a row.| Method Detail |
|---|
public Traversable add(HTML htmlObject)
Container
add in interface Traversableadd in class ContainerhtmlObject - -
the Object to add (eg. doc.add(new htmlBody);)
Container.add(org.pajes.html.HTML)public Table.Body addBody()
public Table.Cell addCell(boolean content)
content - the content to place in the cell.
public Table.Cell addCell(java.lang.Boolean content)
content - the content to place in the cell.
public Table.Cell addCell(HTML content)
content - the content to place in the cell.
public Table.Cell addCell(HTML content,
int columnsToSpan)
content - the content to place in the cell.columnsToSpan - the number of columns this content should span.
public Table.Cell addCell(HTML content,
java.lang.String align)
content - the content to place in the cell.align - the horizontal alignment of the content within the cell.
public Table.Cell addCell(HTML content,
java.lang.String align,
int columnsToSpan)
content - the content to place in the next cellalign - the horizontal alignment of the content within the cellcolumnsToSpan - the number of columns this content should span.
public Table.Cell addCell(int content)
content - the content to place in the cell.
public Table.Cell addCell(java.lang.String content)
content - the content to place in the cell.
public Table.Cell addCell(java.lang.String content,
boolean bold,
java.lang.String align)
content - the content to place in the cell.bold - if true, the content of the cell will be displayed in bold
font.align - the horizontal alignment of the content within the cell.
public Table.Cell addCell(java.lang.String content,
int columnsToSpan)
content - the content to place in the cell.columnsToSpan - the number of columns this content should span.
public Table.Cell addCell(java.lang.String content,
java.lang.String align)
content - the content to place in the cell.align - the horizontal alignment of the content within the cell.
public Table.Cell addHeadingCell(HTML headingContent)
headingContent - The feature to be added to the HeadingCell attribute
public Table.Cell addHeadingCell(HTML headingContent,
int columnsToSpan)
headingContent - The feature to be added to the HeadingCell attributecolumnsToSpan - the number of columns this content should span.
public Table.Cell addHeadingCell(HTML headingContent,
int columnsToSpan,
int rowsToSpan)
headingContent - The feature to be added to the HeadingCell attributecolumnsToSpan - the number of columns this content should span.rowsToSpan - the number of rows this content should span.
public Table.Cell addHeadingCell(java.lang.String headingContent)
headingContent - The feature to be added to the HeadingCell attribute
public Table.Cell addHeadingCell(java.lang.String headingContent,
int columnsToSpan)
headingContent - The feature to be added to the HeadingCell attributecolumnsToSpan - the number of columns this content should span.
public Table.Cell addHeadingCell(java.lang.String headingContent,
int columnsToSpan,
int rowsToSpan)
headingContent - The feature to be added to the HeadingCell attributecolumnsToSpan - the number of columns this content should span.rowsToSpan - the number of rows this content should span.
public Table.Row addRow()
body has been
added, then it is added to the last added body.
public java.lang.Object clone()
Container
clone in interface HTMLclone in class ContainerObject.clone()public Table.Cell currentCell()
public Table.Row currentRow()
public Table.Cell getCell(int row,
int col)
row - the zero-based index of the row to access.col - the zero-based index of the column to access on the specified
row.
public Table.Foot getFooter()
public Table.Head getHeader()
public Table.Cell getLogicalCell(int row,
int col)
row - the zero-based index of the row to access.col - the zero-based index of the column to access on the specified
row.
public Table.Cell[][] getLogicalCellMap(boolean fill)
fill - if true, cell instances may appear multiple times in the
array, if they span multiple columns or rows. If false, cells
that would logically be filled by an adjacent cell will be
null.
public int getMaxColumns()
public Tag setAttribute(java.lang.String name,
java.lang.String value)
Tag
setAttribute in class Tagname - The attribute name.value - The value of the attribute.
Tag.setAttribute(java.lang.String, java.lang.String)public Table setBackgroundImage(java.lang.String imageURL)
imageURL - the URL of the background image.
public Table setBorderColor(Color color)
color - the colour name or HTML RGB colour.
public Table setBorderWidth(int pixels)
pixels - the width of the border in pixels.
public Table setCellPadding(int pixels)
pixels - the number of pixels with which to pad the cells.
public Table setCellSpacing(int pixels)
pixels - the number of pixels with which to space the cells.
public Table setMaxColumns(int columns)
columns - the number of columns in the table. When set, a new row will
be automatically added as soon this number of columns is
reached in a row.
public Table setSummary(java.lang.String summary)
summary - the summary to set for the table.
public void write(Browser browser)
throws java.io.IOException
Tag
write in interface HTMLwrite in class Tagbrowser - the browser to which the results are to be output.
java.io.IOException - if an I/O error occurs writing to the browser.Tag.setWriteEndTag(boolean),
Tag.writeContent(org.pajes.servlet.Browser)
|
PAJES 3.0.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||