|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.servlet.tbeans.tableview.hdml.TableView
public class TableView
The TableView is a TransformationBean for creating HDML tables. Unlike WML, HDML does not support the <table> tag. Instead, this Transformation Bean uses the <line> and <tab> tags to format the table.
The TableColumn provides a slot for holding an identifier or "tag" for each column, and the TableView and TableColumnModel both support getColumn(Object id) conveniences for locating columns by their identifier. If no identifier is explicitly set, the TableColumn returns its header value (the name of the column) as a default. A different identifier, which can be of any type, can be set using the TableColumn's setIdentifier method. All of the TableView's functions operate correctly regardless of the type and uniqueness of these identifiers.
BaseTableView,
Serialized Form| Field Summary |
|---|
| Fields inherited from class com.sas.servlet.tbeans.tableview.BaseTableView |
|---|
columnsToExportAsTextIfCustomFormatted, EDITROW, LASTROW |
| Fields inherited from class com.sas.servlet.tbeans.tableview.AbstractBaseTableView |
|---|
DEFAULT_EXPORT_NUMERIC_CUSTOM_FORMATED_VALUES_AS_TEXT, MISSING_STYLEINFO, WRAP_ALL, WRAP_NONE, WRAP_PER_COLUMN |
| Fields inherited from interface com.sas.servlet.tbeans.HttpConstants |
|---|
ALL, BASELINE, CHAR, COL, COLGROUP, JUSTIFY, MULTIPLE, NONE, ROW, ROWGROUP, SINGLE |
| Constructor Summary | |
|---|---|
TableView()
Constructs a new default TableView with a null data model, a null column model and a null row model. |
|
TableView(int numRows,
int numColumns)
Constructs a TableView with numRows and numColumns of empty cells using DefaultTableModel. |
|
TableView(java.lang.Object[][] rowData,
java.lang.Object[] columnNames)
Constructs a TableView to display the values in the two dimensional array, rowData, with column names, columnNames. |
|
TableView(javax.swing.table.TableModel tableModel)
Constructs a TableView that is initialized with tableModel as the data model, a default column model, and a default row model. |
|
TableView(javax.swing.table.TableModel tableModel,
TableColumnModel columnModel)
Constructs a TableView that is initialized with tableModel as the data model and columnModel as the column model, and a default row model. |
|
TableView(javax.swing.table.TableModel tm,
TableColumnModel cm,
TableRowModel rm)
Constructs a TableView that is initialized with tableModel as the data model, columnModel as the column model and rowModel as the row model. |
|
TableView(java.util.Vector rowData,
java.util.Vector columnNames)
Constructs a TableView to display the values in the Vector of Vectors, rowData, with column names, columnNames. |
|
| Method Summary | |
|---|---|
BaseColumnHeader |
getDefaultColumnHeader()
Returns the default columnHeader for the TableView. |
TableRowRenderer |
getDefaultColumnHeaderRowRenderer()
Gets the default row renderer for the TableView's column header row. |
TableColumnModel |
getDefaultColumnModel()
Returns the default column model for the TableView. |
TableColumn |
getDefaultEditColumn()
Method not implemented, returns null. |
HttpEditController |
getDefaultEditController()
Method not implemented, returns null. |
TableCellEditor |
getDefaultEditor()
Editing not implemented on this class, returns null. |
TableCellContentsRenderer |
getDefaultNoRowsRenderer()
Gets the default noRows cell content renderer for the TableView. |
TableCellRenderer |
getDefaultRenderer()
Gets the default cell renderer for the TableView. |
BaseRowHeader |
getDefaultRowHeader()
Returns the default rowHeader for the TableView. |
TableRowModel |
getDefaultRowModel()
Returns the default row model for the TableView. |
TableRowRenderer |
getDefaultRowRenderer()
Gets the default row renderer for the TableView. |
TableColumn |
getDefaultRowSelectionColumn()
Method not implemented, returns null. |
void |
setDefaultColumnHeaderRowRenderer(TableRowRenderer renderer)
Sets the default row renderer for the TableView's column header row. |
void |
setDefaultRenderer(TableCellRenderer renderer)
Sets the default cell renderer for the TableView. |
void |
setDefaultRowRenderer(TableRowRenderer renderer)
Sets the default row renderer for the TableView. |
void |
writeEmptyTable(java.io.PrintWriter out)
Writes an empty table when a data model in not attached or the data model has no rows in it. |
void |
writeTableFooter(java.io.PrintWriter out)
Writes the footer tag for the tableview. |
void |
writeTableHeader(java.io.PrintWriter out)
Writes the header tag and all its attributes for tableview. |
| Methods inherited from class com.sas.servlet.tbeans.BaseActionTransformation |
|---|
dispose, getActionProvider, getActionSupportType, getUniqueId, isActionVisible, listActionTypes, listAreaTypes, setActionProvider, setActionSupportType, setActionVisible, setUniqueId |
| Methods inherited from interface com.sas.actionprovider.URLTemplateViewInterface |
|---|
getURLTemplate, setURLTemplate |
| Methods inherited from interface com.sas.servlet.tbeans.TransformationInterface |
|---|
getCustomAttributes, getDescription, getId, getLocale, getName, getRequest, getResponse, getTagEpilog, getTagProlog, isVisible, setCustomAttributes, setDescription, setId, setName, setRequest, setResponse, setTagEpilog, setTagProlog, setVisible, write, write, write |
| Methods inherited from interface com.sas.actionprovider.HttpActionProviderViewInterface |
|---|
getRequest, setRequest |
| Constructor Detail |
|---|
public TableView()
public TableView(javax.swing.table.TableModel tableModel)
tableModel - the data model for the table
public TableView(javax.swing.table.TableModel tableModel,
TableColumnModel columnModel)
tableModel - the data model for the tablecolumnModel - the column model for the table
public TableView(javax.swing.table.TableModel tm,
TableColumnModel cm,
TableRowModel rm)
tableModel - the data model for the tablecolumnModel - the column model for the tablerowModel - the row model for the table
public TableView(int numRows,
int numColumns)
numRows - the number of rows the table holdsnumColumns - the number of columns the table holdsDefaultTableModel
public TableView(java.lang.Object[][] rowData,
java.lang.Object[] columnNames)
Constructs a TableView to display the values in the two dimensional array, rowData, with column names, columnNames. The rowData is an array of rows, so the value of the cell at row 1, column 5 can be obtained with the following code:
rowData[1][5];
All rows must be of the same length as columnNames.
rowData - the data for the new tablecolumnNames - names of each column
public TableView(java.util.Vector rowData,
java.util.Vector columnNames)
((Vector)rowData.elementAt(1)).elementAt(5);
Each row must contain a value for each column or an exception will be raised.
rowData - the data for the new tablecolumnNames - names of each column| Method Detail |
|---|
public TableColumnModel getDefaultColumnModel()
getDefaultColumnModel in class BaseTableViewpublic TableRowModel getDefaultRowModel()
getDefaultRowModel in class BaseTableViewpublic BaseColumnHeader getDefaultColumnHeader()
getDefaultColumnHeader in class BaseTableViewpublic BaseRowHeader getDefaultRowHeader()
getDefaultRowHeader in class BaseTableViewpublic TableCellRenderer getDefaultRenderer()
getDefaultRenderer in class BaseTableViewpublic void setDefaultRenderer(TableCellRenderer renderer)
renderer - the default cell renderer for the TableViewpublic TableCellEditor getDefaultEditor()
getDefaultEditor in class BaseTableViewpublic TableRowRenderer getDefaultColumnHeaderRowRenderer()
getDefaultColumnHeaderRowRenderer in class BaseTableViewpublic void setDefaultColumnHeaderRowRenderer(TableRowRenderer renderer)
renderer - the default row renderer for the TableView's column
header rowpublic TableRowRenderer getDefaultRowRenderer()
getDefaultRowRenderer in class BaseTableViewpublic void setDefaultRowRenderer(TableRowRenderer renderer)
renderer - the default row renderer for the TableViewpublic TableCellContentsRenderer getDefaultNoRowsRenderer()
getDefaultNoRowsRenderer in class BaseTableView
public void writeTableHeader(java.io.PrintWriter out)
throws java.io.IOException
writeTableHeader in class AbstractBaseTableViewout - the output stream
java.io.IOException - Thrown if some type of I/O error occurs
public void writeTableFooter(java.io.PrintWriter out)
throws java.io.IOException
writeTableFooter in class AbstractBaseTableViewout - the output stream
java.io.IOException - Thrown if some type of I/O error occurs
public void writeEmptyTable(java.io.PrintWriter out)
throws java.io.IOException
writeEmptyTable in class AbstractBaseTableViewout - The output stream
java.io.IOException - Thrown if some type of I/O error occurspublic HttpEditController getDefaultEditController()
getDefaultEditController in class BaseTableViewHttpEditControllerpublic TableColumn getDefaultRowSelectionColumn()
getDefaultRowSelectionColumn in class BaseTableViewBaseTableView.setRowSelectionMode(int),
BaseTableView.getRowSelectionMode()public TableColumn getDefaultEditColumn()
getDefaultEditColumn in class BaseTableView
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||