|
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 FormField Summary |
---|
Fields inherited from class com.sas.servlet.tbeans.tableview.BaseTableView |
---|
columnsToExportAsTextIfCustomFormatted, columnsToNotEncode, 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.tableview.ExportAsHyperlinkInterface |
---|
DEFAULT_VALUE_FOR_CURRENT_VALUE_TO_ENCODE |
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 tablepublic TableView(javax.swing.table.TableModel tableModel, TableColumnModel columnModel)
tableModel
- the data model for the tablecolumnModel
- the column model for the tablepublic 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 tablepublic 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 columnpublic 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 columnMethod Detail |
---|
public TableColumnModel getDefaultColumnModel()
getDefaultColumnModel
in class BaseTableView
public TableRowModel getDefaultRowModel()
getDefaultRowModel
in class BaseTableView
public BaseColumnHeader getDefaultColumnHeader()
getDefaultColumnHeader
in class BaseTableView
public BaseRowHeader getDefaultRowHeader()
getDefaultRowHeader
in class BaseTableView
public TableCellRenderer getDefaultRenderer()
getDefaultRenderer
in class BaseTableView
public void setDefaultRenderer(TableCellRenderer renderer)
renderer
- the default cell renderer for the TableViewpublic TableCellEditor getDefaultEditor()
getDefaultEditor
in class BaseTableView
public TableRowRenderer getDefaultColumnHeaderRowRenderer()
getDefaultColumnHeaderRowRenderer
in class BaseTableView
public void setDefaultColumnHeaderRowRenderer(TableRowRenderer renderer)
renderer
- the default row renderer for the TableView's column
header rowpublic TableRowRenderer getDefaultRowRenderer()
getDefaultRowRenderer
in class BaseTableView
public 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 AbstractBaseTableView
out
- the output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic void writeTableFooter(java.io.PrintWriter out) throws java.io.IOException
writeTableFooter
in class AbstractBaseTableView
out
- the output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic void writeEmptyTable(java.io.PrintWriter out) throws java.io.IOException
writeEmptyTable
in class AbstractBaseTableView
out
- The output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic HttpEditController getDefaultEditController()
getDefaultEditController
in class BaseTableView
HttpEditController
public TableColumn getDefaultRowSelectionColumn()
getDefaultRowSelectionColumn
in class BaseTableView
BaseTableView.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 |