com.sas.servlet.tbeans.tableview.html
Class TableView

com.sas.servlet.tbeans.tableview.html.TableView
All Implemented Interfaces:
ActionProviderViewInterface, HttpActionProviderInterface, HttpActionProviderViewInterface, com.sas.actionprovider.refresh.PartialRefreshActionsInterface, URLTemplateViewInterface, com.sas.beans.PropertyChangeSource, com.sas.lang.ObjectDataInterface, com.sas.servlet.tbeans.AJAXControllerURLInterface, ComplexStyleInterface, com.sas.servlet.tbeans.features.FeatureListInterface, FormViewInterface, HttpConstants, BaseNavigationInterface, ColumnNavigationInterface, EditNavigationInterface, RowNavigationInterface, RenderableInterface, ExportAsHyperlinkInterface, TableViewStyleKeysInterface, TableColumnModelListener, TransformationInterface, com.sas.servlet.tbeans.TransformationInterface2, AccurateRowCountInterface, com.sas.table.MoveColumnInterface, com.sas.util.WriteToPrintWriterInterface, java.io.Serializable, java.util.EventListener, javax.swing.event.TableModelListener, javax.swing.SwingConstants

public class TableView
implements FormViewInterface, TableViewStyleKeysInterface

The TableView is a TransformationBean™ that generates the appropriate HTML 4.0 and JavaScript to represent a table of data from the given 2-dimensional model.

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.

The TableView is one of several TransformationBeans™ that rely on a set of style classes that are used by default when generating the resulting markup language. For more information on style sheets and the default style classes that apply to this TransformationBean™, refer to the AppDev Studio Developer Site. You'll find a useful reference document entitled Cascading Style Sheets, Images, and TransformationBeans™ as well as the TransformationBeans™ Style Sheet Reference.

The TableView is one of several TransformationBeans™ that rely on JavaScript to provide some of its functionality. These JavaScript files are including automatically by the tbean. See JavaScriptIncludeHandler for more information about how these files are included and how to customize this behavior. The TableView uses the following JavaScript files:

sas_tableview.js

Note that the toString() method on this class calls the write method, which may have undesirable side effects. See BaseTransformation.toString() for more information. Debuggers often use toString() to show the value of a variable, and this may cause unexpected behavior while debugging

For More Information:

Visit the AppDev Studio Developer's Site to access step-by-step examples, white papers and additional usage information at http://support.sas.com/rnd/appdev/.

Examples for this class may be found on the Examples Site.

JSP custom tags provide an alternative to using the TransformationBeans™. Visit the Custom Tag Library Reference for additional information on the sas:TableView custom tag.

Note: A snapshot of the AppDev Studio Developers Site is installed on your local Web server when you install AppDev Studio. To access the site from webAF, select Help -> Developer Site .

See Also:
TableViewComposite, BaseTableView, Serialized Form

Field 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.html.TableViewStyleKeysInterface
TABLEVIEW_COLUMN_HEADER_ROW_STYLE, TABLEVIEW_COLUMN_HEADER_STYLE, TABLEVIEW_DATA_NUMERIC_STYLE, TABLEVIEW_DATA_STYLE, TABLEVIEW_EDIT_COLUMN_CELL_STYLE, TABLEVIEW_EDIT_ROW_CELL_STYLE, TABLEVIEW_EMPTY_DATA_STYLE, TABLEVIEW_FOOTER_ROW_STYLE, TABLEVIEW_ROW_HEADER_STYLE, TABLEVIEW_ROW_SELECTION_STYLE, TABLEVIEW_ROW_STYLE, TABLEVIEW_STYLE, TABLEVIEW_TITLE_ROW_STYLE, TABLEVIEW_TOTALS_ROW_STYLE
 
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
 java.util.HashMap getAdditionalParameters()
          Returns an HashMap containing additional parameters that should be added to the form used to perform the various actions on the TableView.
 int getColSpanAll()
           
 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()
          Returns the default instance of TableColumn to use as the column, independent of the data, which contains the edit actions.
 HttpEditController getDefaultEditController()
          Returns the default edit controller.
 TableCellEditor getDefaultEditor()
          Gets the default cell editor for the TableView.
 Form getDefaultFormObject()
          Gets the default form object to be used by the TableView.
 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()
          Returns the default instance of TableColumn to use as the column, independent of the data, that can be used to select rows in the TableView.
 Form getFormObject()
          Gets the form object to be used by the TableView.
 boolean isFormEnabled()
          Determines if the TableView should render its formObject.
 void setAdditionalParameter(java.lang.String name, java.lang.String value)
          Sets an additional parameter to be added to the form used to perform the various actions on the TableView.
 void setAdditionalParameters(java.util.HashMap map)
          Sets an HashMap containing additional parameters that should be added to the form used to perform the various actions on the TableView.
 void setDefaultColumnHeaderRowRenderer(TableRowRenderer renderer)
          Sets the default row renderer for the TableView's column header row.
 void setDefaultEditor(TableCellEditor editor)
          Sets the default cell editor for the TableView.
 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 setFormEnabled(boolean enable)
          Sets whether the TableView should render its formObject.
 void setFormObject(Form form)
          Sets the form object to be used by the TableView.
 void writeColumnHeader(java.io.PrintWriter out)
          Writes the headerValue for each column in the column model.
 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.
protected  void writeRows(java.io.PrintWriter out)
          Writes the rows of data for the tableview.
 void writeTableFooter(java.io.PrintWriter out)
          Writes the end tag for the tableview.
 void writeTableHeader(java.io.PrintWriter out)
          Writes the header tag and all its attributes for tableview.
 void writeTableTFoot(java.io.PrintWriter out)
          Writes the tfoot section of the table
 
Methods inherited from class com.sas.servlet.tbeans.tableview.BaseTableView
addColumn, cancel, cleanUpResources, columnAdded, columnMoved, columnRemoved, commit, createDefaultColumnsFromModel, delete, getAutoCreateColumnsFromModel, getCellEditor, getCellRenderer, getColumn, getColumnCount, getColumnHeader, getColumnHeaderActions, getColumnHeaderAreaRenderer, getColumnModel, getColumnScrollSize, getColumnsToExportAsTextIfCustomFormatted, getColumnUniqueModelId, getCurrentColumn, getCurrentRow, getDataCellActions, getEditColumn, getEditColumnActions, getEditController, getEditRowActions, getModel, getMultiColumnRuleCount, getNoRowsRenderer, getRowCount, getRowHeader, getRowModel, getRowRenderer, getRowSelectionColumn, getRowsToDelete, getUncommittedValues, gotoRow, initialize, initializeColumnNumbers, initializeRowNumbers, insert, isAccurateRowCountAvailable, isAutoCommit, isCancelSupported, isCellIdsGenerated, isColumnMoveAllowed, isCommitSupported, isCurrentValueToEncode, isDeleteSupported, isExportNumericCustomFormattedValuesAsText, isGotoColumnSupported, isGotoRowSupported, isInsertSupported, isPromptOnDelete, isUpdateSupported, lastRow, moveColumn, removeColumn, resetColumnHeaderActions, resetDataCellActions, resetEditColumnActions, resetEditRowActions, setAutoCreateColumnsFromModel, setCellEditor, setCellEditor, setCellEditor, setCellIdsGenerated, setCellRenderer, setCellRenderer, setCellRenderer, setColumnHeader, setColumnHeaderAreaRenderer, setColumnModel, setCurrentColumn, setCurrentRow, setEditColumn, setEditController, setLocale, setModel, setNoRowsRenderer, setRowHeader, setRowModel, setRowRenderer, setRowRenderer, setRowSelectionColumn, setRowsToDelete, setUncommittedValues, tableChanged, update, write, writeContent, writeRow, writeRow, writeRow
 
Methods inherited from class com.sas.servlet.tbeans.tableview.AbstractBaseTableView
addFeature, addMoveMenu, firstColumn, firstRow, getBorderWidth, getCaption, getCellPadding, getCellSpacing, getColumnPageSize, getEndColumn, getEndRow, getFormName, getHorizontalAlignment, getRowPageSize, getRulesContext, getStartColumn, getStartRow, getStyleMap, getSummary, getTextWrapping, getWidth, getWidthPercentage, gotoColumn, isAllActionsVisible, isColumnHeaderVisible, isColumnsResizable, isFirstColumnSupported, isFirstRowSupported, isLastColumnSupported, isLastRowSupported, isNextColumnSupported, isNextRowSupported, isPageBackwardColumnsSupported, isPageBackwardRowsSupported, isPageForwardColumnsSupported, isPageForwardRowsSupported, isPreviousColumnSupported, isPreviousRowSupported, isRowHeaderVisible, lastColumn, nextColumn, nextRow, pageBackwardColumns, pageBackwardRows, pageForwardColumns, pageForwardRows, previousColumn, previousRow, removeLastBorder, setAllActionsVisible, setBorderWidth, setCaption, setCellPadding, setCellSpacing, setColumnHeaderVisible, setColumnPageSize, setColumnsResizable, setEndColumn, setEndRow, setHorizontalAlignment, setPageSize, setRowHeaderVisible, setRowPageSize, setRulesContext, setStartColumn, setStartRow, setSummary, setTextWrapping, setWidth, setWidthPercentage, writeColumnHeader, writeColumnHeader, writeEmptyTable, writeEmptyTable, writeFeatures, writeRows, writeRows, writeTableFooter, writeTableFooter, writeTableHeader, writeTableHeader
 
Methods inherited from class com.sas.servlet.tbeans.BaseActionTransformation
dispose, getActionProvider, getActionSupportType, getUniqueId, isActionVisible, listActionTypes, listAreaTypes, setActionProvider, setActionSupportType, setActionVisible, setUniqueId
 
Methods inherited from class com.sas.servlet.tbeans.BaseTransformation
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCustomAttributes, getDescription, getId, getInputTransform, getLocale, getName, getObjectData, getObjectDataProperty, getOutputTransform, getRequest, getResponse, getTagEpilog, getTagProlog, hasListeners, isCleanUpResourcesOn, isVisible, removePropertyChangeListener, removePropertyChangeListener, setCleanUpResourcesOn, setCustomAttributes, setDescription, setId, setInputTransform, setLocaleDependentProperties, setName, setObjectData, setObjectDataProperty, setOutputTransform, setRequest, setResponse, setTagEpilog, setTagProlog, setVisible, toString, write, write, write
 
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

TableView

public TableView()
Constructs a new default TableView with a null data model, a null column model and a null row model.


TableView

public 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.

Parameters:
tableModel - the data model for the table

TableView

public 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.

Parameters:
tableModel - the data model for the table
columnModel - the column model for the table

TableView

public 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. The autoCreateColumnsFromModel flag is set to false if column model passed in is non-null, otherwise it is set to true and the column model is populated with suitable TableColumns for the columns in the data model.

Parameters:
tableModel - the data model for the table
columnModel - the column model for the table
rowModel - the row model for the table

TableView

public TableView(int numRows,
                 int numColumns)
Constructs a TableView with numRows and numColumns of empty cells using DefaultTableModel. It also creates a default column model. The columns will have names of the form "A", "B", "C", etc.

Parameters:
numRows - the number of rows the table holds
numColumns - the number of columns the table holds
See Also:
DefaultTableModel

TableView

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.

Parameters:
rowData - the data for the new table
columnNames - names of each column

TableView

public 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. The Vectors contained in rowData should contain the values for that row. In other words, the value of the cell at row 1, column 5 can be obtained with the following code:

((Vector)rowData.elementAt(1)).elementAt(5);

Each row must contain a value for each column or an exception will be raised.

Parameters:
rowData - the data for the new table
columnNames - names of each column
Method Detail

getDefaultColumnModel

public TableColumnModel getDefaultColumnModel()
Returns the default column model for the TableView. If the data model is not set then the default column model will have a size of zero.

Specified by:
getDefaultColumnModel in class BaseTableView
Returns:
the default column model for the TableView

getDefaultRowModel

public TableRowModel getDefaultRowModel()
Returns the default row model for the TableView.

Specified by:
getDefaultRowModel in class BaseTableView
Returns:
the default row model for the TableView

getDefaultColumnHeader

public BaseColumnHeader getDefaultColumnHeader()
Returns the default columnHeader for the TableView.

Specified by:
getDefaultColumnHeader in class BaseTableView
Returns:
the default columnHeader for the TableView

getDefaultRowHeader

public BaseRowHeader getDefaultRowHeader()
Returns the default rowHeader for the TableView.

Specified by:
getDefaultRowHeader in class BaseTableView
Returns:
the default rowHeader for the TableView

setFormObject

public void setFormObject(Form form)
Sets the form object to be used by the TableView.

Specified by:
setFormObject in interface FormViewInterface
Parameters:
form - The form object

getFormObject

public Form getFormObject()
Gets the form object to be used by the TableView.

Specified by:
getFormObject in interface FormViewInterface
Returns:
The form object

getDefaultFormObject

public Form getDefaultFormObject()
Gets the default form object to be used by the TableView.

Specified by:
getDefaultFormObject in interface FormViewInterface
Returns:
the form object

getAdditionalParameters

public java.util.HashMap getAdditionalParameters()
Returns an HashMap containing additional parameters that should be added to the form used to perform the various actions on the TableView. The default value is null. Each parameter will be added to the form as a hidden field using the name of the item as the "name=" parameter on the <input> tag and the value of the item as the "value=" parameter on the <input> tag.

Specified by:
getAdditionalParameters in interface FormViewInterface
Returns:
an HashMap containing additional parameters that should be added to the form
See Also:
HashMap

setAdditionalParameters

public void setAdditionalParameters(java.util.HashMap map)
Sets an HashMap containing additional parameters that should be added to the form used to perform the various actions on the TableView. The default value is null. Each parameter will be added to the form as a hidden field using the name of the item as the "name=" parameter on the <input> tag and the value of the item as the "value=" parameter on the <input> tag.

Specified by:
setAdditionalParameters in interface FormViewInterface
Parameters:
map - HashMap object
See Also:
HashMap

setAdditionalParameter

public void setAdditionalParameter(java.lang.String name,
                                   java.lang.String value)
Sets an additional parameter to be added to the form used to perform the various actions on the TableView. In the html version, Each parameter will be added to the form as a hidden field using the name of the item as the name= parameter on the <input> tag and the value of the item as the value= parameter on the input tag.

Specified by:
setAdditionalParameter in interface FormViewInterface
Parameters:
name - name of the list item
value - value of the list item
See Also:
HashMap

setFormEnabled

public void setFormEnabled(boolean enable)
Sets whether the TableView should render its formObject. If so, then set to true. If set to false, the the user is responsible for rendering the formObject via its writeHeader and writeFooter methods.

Specified by:
setFormEnabled in interface FormViewInterface
Parameters:
value - true if the formObject should be rendered by the tbean

isFormEnabled

public boolean isFormEnabled()
Determines if the TableView should render its formObject. If true, then the tbean is responsible for rendering the formObject via the formObject's writeHeader and writeFooter methods. If false then the tbean does not render the formObject and the user is responsible for rendering the formObject. By default, the TableView only uses form submission when in edit mode.

Specified by:
isFormEnabled in interface FormViewInterface
Returns:
true if the tbean should render its formObject

getDefaultRenderer

public TableCellRenderer getDefaultRenderer()
Gets the default cell renderer for the TableView.

Specified by:
getDefaultRenderer in class BaseTableView
Returns:
an instance of the TableCellRenderer

setDefaultRenderer

public void setDefaultRenderer(TableCellRenderer renderer)
Sets the default cell renderer for the TableView.

Parameters:
renderer - the default cell renderer for the TableView

getDefaultEditor

public TableCellEditor getDefaultEditor()
Gets the default cell editor for the TableView.

Specified by:
getDefaultEditor in class BaseTableView
Returns:
an instance of the TableCellRenderer

setDefaultEditor

public void setDefaultEditor(TableCellEditor editor)
Sets the default cell editor for the TableView.

Parameters:
renderer - the default cell editor for the TableView

getDefaultColumnHeaderRowRenderer

public TableRowRenderer getDefaultColumnHeaderRowRenderer()
Gets the default row renderer for the TableView's column header row.

Specified by:
getDefaultColumnHeaderRowRenderer in class BaseTableView
Returns:
an instance of the TableRowRenderer

setDefaultColumnHeaderRowRenderer

public void setDefaultColumnHeaderRowRenderer(TableRowRenderer renderer)
Sets the default row renderer for the TableView's column header row.

Parameters:
renderer - the default row renderer for the TableView's column header row

getDefaultRowRenderer

public TableRowRenderer getDefaultRowRenderer()
Gets the default row renderer for the TableView.

Specified by:
getDefaultRowRenderer in class BaseTableView
Returns:
an instance of the TableRowRenderer

setDefaultRowRenderer

public void setDefaultRowRenderer(TableRowRenderer renderer)
Sets the default row renderer for the TableView.

Parameters:
renderer - the default row renderer for the TableView

getDefaultNoRowsRenderer

public TableCellContentsRenderer getDefaultNoRowsRenderer()
Gets the default noRows cell content renderer for the TableView. This renderer is used when there are no rows in the data model.

Specified by:
getDefaultNoRowsRenderer in class BaseTableView
Returns:
an instance of the TableCellContentsRenderer

writeTableHeader

public void writeTableHeader(java.io.PrintWriter out)
                      throws java.io.IOException
Writes the header tag and all its attributes for tableview.

Specified by:
writeTableHeader in class AbstractBaseTableView
Parameters:
out - the output stream
Throws:
java.io.IOException - Thrown if some type of I/O error occurs

getColSpanAll

public int getColSpanAll()
Overrides:
getColSpanAll in class AbstractBaseTableView

writeColumnHeader

public void writeColumnHeader(java.io.PrintWriter out)
                       throws java.io.IOException
Writes the headerValue for each column in the column model. If the column's headerValue is null then the column name from the dataModel is used.

Overrides:
writeColumnHeader in class BaseTableView
Parameters:
out - the output stream
Throws:
java.io.IOException - Thrown if some type of I/O error occurs

writeTableTFoot

public void writeTableTFoot(java.io.PrintWriter out)
                     throws java.io.IOException
Writes the tfoot section of the table

Overrides:
writeTableTFoot in class AbstractBaseTableView
Parameters:
out - the output stream
Throws:
java.io.IOException - Thrown if some type of I/O error occurs

writeRows

protected void writeRows(java.io.PrintWriter out)
                  throws java.io.IOException
Writes the rows of data for the tableview. This method will also write out the rowHeaders for each row. This method calls writeRow() for each row in the TableView's data model.

Overrides:
writeRows in class BaseTableView
Parameters:
out - The output stream
Throws:
java.io.IOException - Thrown if some type of I/O error occurs

writeTableFooter

public void writeTableFooter(java.io.PrintWriter out)
                      throws java.io.IOException
Writes the end tag for the tableview.

Specified by:
writeTableFooter in class AbstractBaseTableView
Parameters:
out - the output stream
Throws:
java.io.IOException - Thrown if some type of I/O error occurs

writeEmptyTable

public void writeEmptyTable(java.io.PrintWriter out)
                     throws java.io.IOException
Writes an empty table when a data model in not attached or the data model has no rows in it. The method makes use of the no rows renderer.

Specified by:
writeEmptyTable in class AbstractBaseTableView
Parameters:
out - The output stream
Throws:
java.io.IOException - Thrown if some type of I/O error occurs

getDefaultEditController

public HttpEditController getDefaultEditController()
Returns the default edit controller.

Specified by:
getDefaultEditController in class BaseTableView
Returns:
the default edit controller
See Also:
EditControllerInterface

getDefaultRowSelectionColumn

public TableColumn getDefaultRowSelectionColumn()

Returns the default instance of TableColumn to use as the column, independent of the data, that can be used to select rows in the TableView. This column can be added to the ColumnModel. If the rowSelectionColumn is visible and the rowSelectionColumn is not in the ColumnModel, then the rowSelectionColumn will be displayed automatically before the data columns. If the rowSelectionColumn has been added to the ColumnModel then the rowSelectionColumn will be displayed only at the locations specified in the ColumnModel, as long as the rowSelectionColumn is visible. The following attributes will be set on the returned TableColumn:

identifier: "TABLEVIEW_ROW_SELECTION"
headerValue: ""
modelIndex: -1
cellRenderer: new RowSelectionRenderer()

Specified by:
getDefaultRowSelectionColumn in class BaseTableView
Returns:
the TableColumn used to represent a column that will allow row selection
See Also:
BaseTableView.setRowSelectionMode(int), BaseTableView.getRowSelectionMode()

getDefaultEditColumn

public TableColumn getDefaultEditColumn()

Returns the default instance of TableColumn to use as the column, independent of the data, which contains the edit actions. This column can be added to the ColumnModel. If the editing is enabled and the editColumn is not in the ColumnModel, then the editColumn will be displayed automatically before the data columns. If the editColumn has been added to the ColumnModel, then the editColumn will be displayed only at the locations specified in the ColumnModel, as long as editing is enabled. The following attributes will be set on the returned TableColumn:

identifier: "TABLEVIEW_EDIT_COLUMN"
headerValue: ""
modelIndex: -1

Specified by:
getDefaultEditColumn in class BaseTableView
Returns:
the TableColumn used to render edit actions for the TableView's EDIT_COLUMN_AREA



Copyright © 2009 SAS Institute Inc. All Rights Reserved.