|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Convenience interface for creating 2-dimensional tables. TableInterface can be used to automate this task. It can also be used to write the contents of a data table to output, row by row.
Method Summary | |
String |
getBeginRowFormat()
Gets the format to begin a new table row |
int |
getBorderWidth()
Gets the width of the outer border around the table. |
int |
getCellPadding()
Gets the number of pixels between the border of a cell and the cell's contents. |
int |
getCellSpacing()
Gets the number of pixels between the border of each cell. |
String |
getColumnFormat()
Gets the format to be applied to each data element in a row. |
String |
getColumnFormat(int index)
Gets the format to be applied to a single data element in a row. |
String |
getColumnFormat(int columnIndex,
long rowIndex)
Gets the format to be applied to a single data element in the given row. |
String |
getColumnHeadingColumnFormat()
Gets the format to be applied to each column heading column |
String |
getColumnHeadingColumnFormat(int index)
Gets the format to be applied to a single column heading column. |
String |
getColumnHeadingFormat()
Gets the format for the column heading row. |
String |
getDefaultBeginRowFormat()
Gets the default format to begin a new table row. |
String |
getDefaultColumnFormat()
Gets the default format to be applied to each data element in a row. |
String |
getDefaultColumnHeadingFormat()
Gets the default format to be applied to each column heading column. |
String |
getDefaultEndRowFormat()
Gets the default format to end a table row. |
String |
getEndRowFormat()
Gets the format to end table row |
long |
getMaxRows()
Gets the maximum number of rows to be formatted when writing a table. |
String |
getRowFormat()
Gets the format for each row in the table. |
String |
getRowFormat(long index)
Gets the format for the given row in the table. |
boolean |
getUseColumnHeadings()
Returns true if column headings should be written. |
int |
getWidth()
Gets the width of the table in pixels. |
int |
getWidthPercentage()
Gets the width of the table as a percentage |
boolean |
isLastWriteTruncated()
Determines if the last writing of a table exceeded the maximum number of rows. |
void |
setBeginRowFormat(String format)
Sets the format to begin a new table row |
void |
setBorderWidth(int border)
Sets the width of the outer border around the table in pixels. |
void |
setCellPadding(int padding)
Sets the number of pixels between the border of a cell and the cell's contents. |
void |
setCellSpacing(int spacing)
Sets the number of pixels between the border of each cell. |
void |
setColumnFormat(String format)
Sets the format to be applied to each data element in a row. |
void |
setColumnFormat(String format,
int index)
Sets the format to be applied to an individual data element in a row. |
void |
setColumnFormat(String format,
int index,
int repeatColumn)
Sets the format to be applied to an individual data element in a row. |
void |
setColumnFormat(String format,
int index,
int repeatColumn,
long startingRow,
int repeatRow)
Sets the format to be applied to an individual data element in the given row. |
void |
setColumnFormat(String format,
int index,
long startingRow,
int repeatRow)
Sets the format to be applied to an individual data element in the given row. |
void |
setColumnHeadingColumnFormat(String format)
Sets the format to be applied to each column heading column. |
void |
setColumnHeadingColumnFormat(String format,
int index)
Sets the format to be applied to a single column heading column. |
void |
setColumnHeadingFormat(String format)
Sets the format for the column heading row. |
void |
setEndRowFormat(String format)
Sets the format to end a table row |
void |
setMaxRows(long n)
Sets the maximum number of rows to be formatted when writing a table. |
void |
setRowFormat(String format)
Sets the format for each row in the table. |
void |
setRowFormat(String format,
long startingRow,
int repeatRow)
Sets the format for a given 1-based row number in the table. |
void |
setUseColumnHeadings(boolean enable)
Turns on/off the use of column headings. |
void |
setWidth(int pixels)
Sets the width of the table in pixels. |
void |
setWidthPercentage(int width)
Sets the width of the table as a percentage |
void |
writeColumnHeadings(PrintWriter out)
Writes the column headings |
void |
writeRow(long row,
PrintWriter out)
Writes a single row of the formatted table. |
void |
writeTableFooter(PrintWriter out)
Writes the table footer |
void |
writeTableHeader(PrintWriter out)
Writes the table header |
Methods inherited from interface com.sas.servlet.beans.TableWriterInterface |
writeColumnHeadings,
writeColumnHeadings,
writeRow,
writeRow,
writeTableFooter,
writeTableFooter,
writeTableHeader,
writeTableHeader |
Method Detail |
public void setWidth(int pixels)
width
- The width in pixelspublic int getWidth()
public void setWidthPercentage(int width)
width
- The width as a percentagepublic int getWidthPercentage()
public void setBorderWidth(int border)
border
- The border width in pixelspublic int getBorderWidth()
public void setCellSpacing(int spacing)
spacing
- The number of pixels between each cellpublic int getCellSpacing()
public void setCellPadding(int padding)
padding
- The number of pixels between the cell border and the cell
contentpublic int getCellPadding()
public void setMaxRows(long n)
max
- The maximum number of rowspublic long getMaxRows()
public boolean isLastWriteTruncated()
public void setRowFormat(String format)
format
- The format stringpublic String getRowFormat()
public void setRowFormat(String format, long startingRow, int repeatRow)
format
- The format string, or null to remove the formatstartingRow
- The 1-based row number that will first use the formatrepeatRow
- The number of rows until the format is repeated, or -1
for no repeating.public String getRowFormat(long index)
index
- The 1-based row indexpublic void setBeginRowFormat(String format)
The
- format stringpublic String getBeginRowFormat()
public void setColumnFormat(String format)
format
- The format string to be applied to each data elementpublic void setColumnFormat(String format, int index)
format
- The format string to be applied to a single data element, or
null to remove the formatindex
- The 1-based column index, or -1 for all columnspublic void setColumnFormat(String format, int index, int repeatColumn)
format
- The format string to be applied to a single data element,
or null to remove the formatindex
- The 1-based column index that will first use the formatrepeatColumn
- The number of columns until the format is repeated,
or -1 for no repeatingpublic void setColumnFormat(String format, int index, long startingRow, int repeatRow)
format
- The format string to be applied to a single data element,
or null to remove the formatindex
- The 1-based column index or -1 for all columnsstartingRow
- The 1-based row number that will first use the formatrepeatRow
- The number of rows until the format is repeated, or -1public void setColumnFormat(String format, int index, int repeatColumn, long startingRow, int repeatRow)
format
- The format string to be applied to a single data element,
or null to remove the formatindex
- The 1-based column index or -1 for all columnsrepeatColumn
- The number of columns until the format is repeated,
or -1 for no repeatingstartingRow
- The 1-based row number that will first use the formatrepeatRow
- The number of rows until the format is repeated, or -1
for no repeatingpublic String getColumnFormat()
public String getColumnFormat(int index)
index
- The 1-based column indexpublic String getColumnFormat(int columnIndex, long rowIndex)
columnIndex
- The 1-based column indexrowIndex
- The 1-based row indexpublic void setEndRowFormat(String format)
The
- format stringpublic String getEndRowFormat()
public String getDefaultBeginRowFormat()
public String getDefaultColumnFormat()
public String getDefaultEndRowFormat()
public String getDefaultColumnHeadingFormat()
public void setColumnHeadingColumnFormat(String format)
The
- column heading column formatpublic void setColumnHeadingColumnFormat(String format, int index)
The
- column heading column format to be applied to a single column,
or null to remove the formatindex
- The 1-based column indexpublic String getColumnHeadingColumnFormat()
public String getColumnHeadingColumnFormat(int index)
index
- The 1-based column indexpublic void setColumnHeadingFormat(String format)
The
- column heading formatpublic String getColumnHeadingFormat()
public void setUseColumnHeadings(boolean enable)
enable
- true if headings should be writtenpublic boolean getUseColumnHeadings()
true
- if headings should be writtenpublic void writeRow(long row, PrintWriter out) throws IOException
row
- The 1-based row number to writeout
- The output streampublic void writeColumnHeadings(PrintWriter out) throws IOException
out
- The output streampublic void writeTableHeader(PrintWriter out) throws IOException
out
- The output streampublic void writeTableFooter(PrintWriter out) throws IOException
out
- The output stream
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |