***  This class contains elements that are subject to change.  ***

com.sas.servlet.tbeans.tableview
Class BaseTableView

com.sas.servlet.tbeans.tableview.BaseTableView
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, HttpConstants, BaseNavigationInterface, ColumnNavigationInterface, EditNavigationInterface, RowNavigationInterface, RenderableInterface, 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
Direct Known Subclasses:
TableView, TableView, TableView

public abstract class BaseTableView
implements javax.swing.event.TableModelListener, TableColumnModelListener, EditNavigationInterface, AccurateRowCountInterface, com.sas.table.MoveColumnInterface

The base abstract Transformation Bean for creating a 2-dimensional Table. The BaseTableView Transformation Bean requires a model that implements javax.swing.table.TableModel.

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. To specify a custom column (i.e. a column that is not in the TableModel), set the TableColumn's modelIndex to -1.

Note that subclasses of this bean actually provide the markup rendering used in/with Servlet and JavaServer Pages technologies. If you need to add support for a markup language that is not explicitly provided with AppDev Studio, then you must extend this class.

For More Information:

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

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:
Serialized Form

Field Summary
protected  java.lang.String[] columnsToExportAsTextIfCustomFormatted
           
static int EDITROW
          Used to specify the row being written when the action for the EDIT_ROW_AREA are being rendered.
static int LASTROW
          Used to specify the LASTROW when setting the CellRenderers and CellEditors.
 
Fields inherited from class com.sas.servlet.tbeans.tableview.AbstractBaseTableView
DEFAULT_EXPORT_NUMERIC_CUSTOM_FORMATED_VALUES_AS_TEXT, 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
BaseTableView()
          Constructs a new default TableView with a null data model, a null column model and a null row model.
 
Method Summary
 void addColumn(TableColumn column)
          Convenience method to add the column to the column model.
 void cancel()
          Cancel any editing changes.
 void cleanUpResources()
          This method releases all of the necessary resources that were needed by the transformation bean to render itself.
 void columnAdded(TableColumnModelEvent event)
          Invoked when a column is added to the table column model.
 void columnMoved(TableColumnModelEvent event)
          Invoked when a column is moved in the table column model.
 void columnRemoved(TableColumnModelEvent event)
          Invoked when a column is removed from the table column model.
 void commit()
          Commit any editing changes.
 void createDefaultColumnsFromModel()
          Creates default columns for the table from the data model using the getColumnCount method defined in the TableModel interface.
 void delete(int row)
          Delete the given row.
 boolean getAutoCreateColumnsFromModel()
          Determines whether the table will create default columns from the model.
 TableCellEditor getCellEditor(int row, int column)
          Returns an appropriate editor for the cell specified by this row and column.
 TableCellRenderer getCellRenderer(int row, int column)
          Returns an appropriate renderer for the cell specified by this row and column.
 TableColumn getColumn(java.lang.Object identifier)
          Convenience method to get the column from the column model.
 int getColumnCount()
          Convenience method to return the number of columns in the column model.
 BaseColumnHeader getColumnHeader()
          Returns the columnHeader for the TableView.
protected  ActionList getColumnHeaderActions(TableColumn column, java.lang.String header)
          Returns the ActionList to be rendered as the column header for the given column.
 com.sas.servlet.tbeans.tableview.ColumnHeaderAreaRenderer getColumnHeaderAreaRenderer()
           
 TableColumnModel getColumnModel()
          Returns the column model that contains all the column information for the TableView.
 int getColumnScrollSize()
          Return the number of columns to scroll when paging forward/backward.
protected  java.lang.String[] getColumnsToExportAsTextIfCustomFormatted(com.sas.iquery.metadata.business.DataItem[] dataItems)
           
 int getCurrentColumn()
          Returns the column number of the current column being displayed in the TableView or -1 if no columns have been displayed yet.
 int getCurrentRow()
          Returns the row number of the current row being displayed in the TableView or -1 if no rows have been displayed yet.
protected  ActionList getDataCellActions(int rowNumber, int colModelIndex)
          Returns the ActionList to be rendered as the cell for the given row and column coordinates.
abstract  BaseColumnHeader getDefaultColumnHeader()
          Returns the default columnHeader for the TableView.
abstract  TableRowRenderer getDefaultColumnHeaderRowRenderer()
          Gets the default row renderer for the TableView's ColumnHeader row.
abstract  TableColumnModel getDefaultColumnModel()
          Returns the default column model for the TableView.
abstract  TableColumn getDefaultEditColumn()
          Returns the default instance of TableColumn to use as the column, independent of the data, which contains the edit actions.
abstract  HttpEditController getDefaultEditController()
          Returns the default edit controller.
abstract  TableCellEditor getDefaultEditor()
          Gets the default cell editor for the TableView.
abstract  TableCellContentsRenderer getDefaultNoRowsRenderer()
          Gets the default cell content renderer to use for the TableView when there are no rows in the TableView or the model is not set.
abstract  TableCellRenderer getDefaultRenderer()
          Gets the default cell renderer for the TableView.
abstract  BaseRowHeader getDefaultRowHeader()
          Returns the default rowHeader for the TableView.
abstract  TableRowModel getDefaultRowModel()
          Returns the default row model for the TableView.
abstract  TableRowRenderer getDefaultRowRenderer()
          Gets the default row renderer for the TableView's data rows.
abstract  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.
 TableColumn getEditColumn()
          Returns an instance of TableColumn to use as the column, independent of the data, which contains the edit actions.
protected  ActionList getEditColumnActions(int rowNumber)
          Returns the ActionList of edit actions for the given row.
 HttpEditController getEditController()
          Returns the controller class used to assist in editing the table.
protected  ActionList getEditRowActions()
          Returns the ActionList of edit actions for the EDITROW.
 javax.swing.table.TableModel getModel()
          Return the data model for the TableView.
protected  int getMultiColumnRuleCount()
           
 TableCellContentsRenderer getNoRowsRenderer()
          Gets the cell content renderer to use for the TableView when there are no rows in the TableView or the model is not set.
 int getRowCount()
          Convenience method to return the number of rows available from the model or -1 if the model is not set.
 BaseRowHeader getRowHeader()
          Returns the rowHeader for the TableView.
 TableRowModel getRowModel()
          Returns the row model that contains all the row renderers for the TableView.
 TableRowRenderer getRowRenderer(int row)
          Returns an appropriate renderer for the row specified by this row.
 TableColumn getRowSelectionColumn()
          Returns the instance of TableColumn used to represent a column, independent of the data, that can be used to select rows in the TableView.
 java.util.Map getRowsToDelete()
          Gets the map containing the name/value pairs of the rows selected for deletion.
 java.util.Map getUncommittedValues()
          Gets the map containing the name/value pairs of the editable fields that have changed and need to be committed.
 void gotoRow(int row)
          Navigates to the given row.
 void initialize()
          Initializes the TableView Object.
 void initializeColumnNumbers()
          Initializes the column numbers.
 void initializeRowNumbers()
          Initializes the row numbers.
 void insert(int row)
          Insert a row before the given row.
 boolean isAccurateRowCountAvailable()
          Returns true if the actual row count is known.
 boolean isAutoCommit()
          Determines whether changed values are committed automatically or the user is prompted to commit the changes.
 boolean isCancelSupported()
          Determines whether canceling an edit change is supported.
 boolean isCellIdsGenerated()
          Returns true if the TableView's cells should have an id property generated.
 boolean isColumnMoveAllowed(int columnIndex, int newIndex)
          Check to see if the column at columnIndex can be moved to newIndex.
 boolean isCommitSupported()
          Determines whether commiting values is supported.
 boolean isDeleteSupported()
          Determines whether deleting a row is supported.
 boolean isExportNumericCustomFormattedValuesAsText(int colModelIndex)
          Returns true if, for a specific column, numeric custom formatted values should be exported as text to Excel, false otherwise.
 boolean isGotoColumnSupported()
          Determines whether navigation to any given column is supported.
 boolean isGotoRowSupported()
          Determines whether navigation to any given row is supported.
 boolean isInsertSupported()
          Determines whether inserting a row is supported.
 boolean isPromptOnDelete()
          Determines whether to prompt the user when deleting a row.
 boolean isUpdateSupported()
          Determines whether updating a row is supported.
 void lastRow()
          Navigates to the last row.
 void moveColumn(int column, int targetColumn)
          Convenience method to move a column in the column model.
 void removeColumn(TableColumn column)
          Convenience method to remove a column from the column model.
protected  void resetColumnHeaderActions()
          Called after the actions from getColumnHeaderActions have been rendered to clear out the ActionList for the columnHeaderActions.
protected  void resetDataCellActions()
          Called after the actions from getDataCellActions have been rendered to clear out the ActionList for the dataCellActions.
protected  void resetEditColumnActions()
          Called after the actions from getEditColumnActions have been rendered to clear out the ActionList for the editColumnActions.
protected  void resetEditRowActions()
          Called after the actions from getEditRowActions have been rendered to clear out the ActionList for the editRowActions.
 void setAutoCreateColumnsFromModel(boolean autoCreate)
          Sets this table's autoCreateColumnsFromModel flag.
 void setCellEditor(int startRow, int endRow, int repeatRowFactor, int startColumn, int endColumn, int repeatColumnFactor, TableCellEditor editor)
          Sets the cell editor for the specific cells located in the specified area determined by startRow, endRow, repeatRowFactor, startColumn, endColumn and repeatColumnFactor.
 void setCellEditor(int row, int column, TableCellEditor editor)
          Sets the cell editor for the specific cell located at the row and column passed in.
 void setCellEditor(com.sas.swing.visuals.tableview.TableFormatAreaInterface area, TableCellEditor editor)
           
 void setCellIdsGenerated(boolean cellIdsGenerated)
          Sets whether the TableView's cells should have an id property generated.
 void setCellRenderer(int startRow, int endRow, int repeatRowFactor, int startColumn, int endColumn, int repeatColumnFactor, TableCellRenderer renderer)
          Sets the cell renderer for the specific cells located in the specified area determined by startRow, endRow, repeatRowFactor, startColumn, endColumn and repeatColumnFactor.
 void setCellRenderer(int row, int column, TableCellRenderer renderer)
          Sets the cell renderer for the specific cell located at the row and column passed in.
 void setCellRenderer(com.sas.swing.visuals.tableview.TableFormatAreaInterface area, TableCellRenderer renderer)
           
 void setColumnHeader(BaseColumnHeader newHeader)
          Sets the columnHeader for the TableView.
 void setColumnHeaderAreaRenderer(com.sas.servlet.tbeans.tableview.ColumnHeaderAreaRenderer customRenderer)
           
 void setColumnModel(TableColumnModel columnModel)
          Sets the column model for the TableView.
 void setCurrentColumn(int column)
          Set the column number of the current column being displayed in the TableView.
 void setCurrentRow(int row)
          Set the row number of the current row being displayed in the TableView.
 void setEditColumn(TableColumn column)
          Sets the instance of TableColumn to use as the column, independent of the data, which contains the edit actions.
 void setEditController(HttpEditController newEditController)
          Sets the controller class used to assist in editing the table.
 void setLocale(java.util.Locale loc)
          Set the locale on the TableView and all the classes used by the TableView.
 void setModel(javax.swing.table.TableModel tableModel)
          Sets the data model for the TableView.
 void setNoRowsRenderer(TableCellContentsRenderer renderer)
          Sets the cell content renderer to use for the TableView when there are no rows in the TableView or the model is not set.
 void setRowHeader(BaseRowHeader newHeader)
          Sets the rowHeader for the TableView.
 void setRowModel(TableRowModel rowModel)
          Sets the row model for the TableView.
 void setRowRenderer(int startRow, int endRow, int repeatRowFactor, TableRowRenderer renderer)
          Sets the row renderer for the specific row(s) passed in determind by startRow, endRow, and repeatRowFactor.
 void setRowRenderer(int row, TableRowRenderer renderer)
          Sets the row renderer for the specific row passed in.
 void setRowSelectionColumn(TableColumn column)
          Sets an instance of TableColumn to use as the column, independent of the data, that can be used to select rows in the TableView.
 void setRowsToDelete(java.util.Map rows)
          Sets the map containing the name/value pairs of the rows selected for deletion.
 void setUncommittedValues(java.util.Map values)
          Sets the map containing the name/value pairs of the editable fields that have changed and need to be committed.
 void tableChanged(javax.swing.event.TableModelEvent e)
          Invoked when this table's TableModel generates a TableModelEvent.
 void update(int row)
          Changes the given row from browse mode to edit mode.
 void write(java.io.PrintWriter out)
          Writes the full version of the transformation which includes the following content:
Opening container html element.
 void writeColumnHeader(java.io.PrintWriter out)
          Writes the headerValue for each column in the column model.
protected  void writeContent(java.io.PrintWriter out)
          Writes the transformation's main content which is everything except for the following:
Opening container html element.
 void writeRow(int rowNumber, java.io.OutputStream out)
          Writes a single row of the TableView.
 void writeRow(int rowNumber, java.io.PrintWriter out)
          Writes a single row of the TableView.
 void writeRow(int rowNumber, java.io.Writer out)
          Writes a single row of the TableView.
protected  void writeRows(java.io.PrintWriter out)
          Writes the rows of data for the tableview.
 
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, writeEmptyTable, writeFeatures, writeRows, writeRows, writeTableFooter, writeTableFooter, writeTableFooter, writeTableHeader, writeTableHeader, writeTableHeader, writeTableTFoot
 
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
 

Field Detail

LASTROW

public static final int LASTROW
Used to specify the LASTROW when setting the CellRenderers and CellEditors.

See Also:
Constant Field Values

EDITROW

public static final int EDITROW
Used to specify the row being written when the action for the EDIT_ROW_AREA are being rendered.

See Also:
Constant Field Values

columnsToExportAsTextIfCustomFormatted

protected java.lang.String[] columnsToExportAsTextIfCustomFormatted
Constructor Detail

BaseTableView

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

Method Detail

getModel

public javax.swing.table.TableModel getModel()
Return the data model for the TableView.

Returns:
the data model for the TableView
See Also:
setModel(javax.swing.table.TableModel)

setModel

public void setModel(javax.swing.table.TableModel tableModel)
Sets the data model for the TableView. If the data model changes and getAutoCreateColumnsFromModel returns true, then this method calls createDefaultColumnsFromModel.

Parameters:
tableModel - the data model for the TableView
See Also:
getModel()

getColumnModel

public TableColumnModel getColumnModel()
Returns the column model that contains all the column information for the TableView. If the column model is not set then the default column model is returned.

Returns:
the column model for the TableView

setColumnModel

public void setColumnModel(TableColumnModel columnModel)
Sets the column model for the TableView. Also sets the column model of the ColumnHeader columnModel.

Parameters:
columnModel - the column model for the TableView

getDefaultColumnModel

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

Returns:
the default column model for the TableView

setAutoCreateColumnsFromModel

public void setAutoCreateColumnsFromModel(boolean autoCreate)
Sets this table's autoCreateColumnsFromModel flag. This method calls createDefaultColumnsFromModel if autoCreateColumnsFromModel changes from false to true.

Parameters:
autoCreate - true if TableView should automatically create columns from the data model
See Also:
getAutoCreateColumnsFromModel(), createDefaultColumnsFromModel()

getAutoCreateColumnsFromModel

public boolean getAutoCreateColumnsFromModel()
Determines whether the table will create default columns from the model. If true, setModel will clear any existing columns and create new columns from the new model. Also, if model changes, then the columns will be rebuilt. The default is true.

Returns:
the true if TableView should automatically create columns from the data model
See Also:
setAutoCreateColumnsFromModel(boolean), createDefaultColumnsFromModel()

createDefaultColumnsFromModel

public void createDefaultColumnsFromModel()
Creates default columns for the table from the data model using the getColumnCount method defined in the TableModel interface.

Clears any existing columns before creating the new columns based on information from the model.

See Also:
getAutoCreateColumnsFromModel()

getRowModel

public TableRowModel getRowModel()
Returns the row model that contains all the row renderers for the TableView. If the row model is not set then the default row model is returned.

Returns:
the row model for the TableView

setRowModel

public void setRowModel(TableRowModel rowModel)
Sets the row model for the TableView. If the row model is set to null, then the default row model is returned.

Parameters:
rowModel - the row model for the TableView

getDefaultRowModel

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

Returns:
the default row model for the TableView

getCurrentRow

public int getCurrentRow()
Returns the row number of the current row being displayed in the TableView or -1 if no rows have been displayed yet.

Specified by:
getCurrentRow in interface EditNavigationInterface
Returns:
current row being displayed in the TableView
See Also:
setCurrentRow(int)

setCurrentRow

public void setCurrentRow(int row)
Set the row number of the current row being displayed in the TableView. This method should only be called if the developer is implementing their own editing/scrolling capabilities and not using the default editing/scrolling capabilities.

Parameters:
row - the row number of the current row being displayed in the TableView
See Also:
getCurrentRow()

getCurrentColumn

public int getCurrentColumn()
Returns the column number of the current column being displayed in the TableView or -1 if no columns have been displayed yet.

Returns:
current column being displayed in the TableView
See Also:
setCurrentColumn(int)

setCurrentColumn

public void setCurrentColumn(int column)
Set the column number of the current column being displayed in the TableView. This method should only be called if the developer is implementing their own editing/scrolling capabilities and not using the default editing/scrolling capabilities.

Parameters:
column - the column number of the current column being displayed in the TableView
See Also:
getCurrentColumn()

setColumnHeader

public void setColumnHeader(BaseColumnHeader newHeader)
Sets the columnHeader for the TableView. If the columnHeader is set to null, then the defaultColumnHeader is returned.

Parameters:
newHeader - the new columnHeader for the TableView

getColumnHeader

public BaseColumnHeader getColumnHeader()
Returns the columnHeader for the TableView. If the columnHeader is not set then the default columnHeader is returned.

Returns:
the columnHeader for the TableView

getDefaultColumnHeader

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

Returns:
the default columnHeader for the TableView

setRowHeader

public void setRowHeader(BaseRowHeader newHeader)
Sets the rowHeader for the TableView. If the rowHeader is set to null, then the defaultRowHeader is returned.

Parameters:
newHeader - the new rowHeader for the TableView

getRowHeader

public BaseRowHeader getRowHeader()
Returns the rowHeader for the TableView. If the rowHeader is not set then the default rowHeader is returned.

Returns:
the rowHeader for the TableView

getDefaultRowHeader

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

Returns:
the default rowHeader for the TableView

setEditController

public void setEditController(HttpEditController newEditController)
Sets the controller class used to assist in editing the table. If the edit controller is set to null, then the default edit controller is returned.

Parameters:
controller - the new edit controller
See Also:
HttpEditController

getEditController

public HttpEditController getEditController()
Returns the controller class used to assist in editing the table. If not set then a default editing controller is returned.

Returns:
the edit controller
See Also:
HttpEditController

getDefaultEditController

public abstract HttpEditController getDefaultEditController()
Returns the default edit controller.

Returns:
the default edit controller
See Also:
HttpEditController

getDefaultColumnHeaderRowRenderer

public abstract TableRowRenderer getDefaultColumnHeaderRowRenderer()
Gets the default row renderer for the TableView's ColumnHeader row.

Returns:
an instance of the TableRowRenderer

getDefaultRowRenderer

public abstract TableRowRenderer getDefaultRowRenderer()
Gets the default row renderer for the TableView's data rows.

Returns:
an instance of the TableRowRenderer

setRowRenderer

public void setRowRenderer(int row,
                           TableRowRenderer renderer)
Sets the row renderer for the specific row passed in. If the row has a -1 value, the renderer for the entire table. If the renderer is null, it sets the renderer to be null, it will use the default row renderer set on the table. The last renderer applied always wins.

Parameters:
row - the row to set the renderer on, -1 if setting the renderer on the entire table is desired
renderer - the renderer to use for the row, null to remove the renderer if previously set
See Also:
setRowRenderer(int, int, int, TableRowRenderer), getRowRenderer(int)

setRowRenderer

public void setRowRenderer(int startRow,
                           int endRow,
                           int repeatRowFactor,
                           TableRowRenderer renderer)
Sets the row renderer for the specific row(s) passed in determind by startRow, endRow, and repeatRowFactor. The repeatRowFactor is used to specify every nth row after the startRow to set the renderer on.

The valid values for startRow are:

       start >= 1
 
The valid values for endRow are:
       end >= start, or end == -1 for all rows
 
The valid values for repeatRowFactor are:
       repeat >= 1
 

If the renderer is null, it sets the renderer to be null, it will use the default row renderer set on the table. The last renderer applied always wins.

Parameters:
startRow - the first row to set the renderer on
endRow - the last row to set the renderer on or -1 for all rows after startRow
repeatRowFactor - specifies every nth row after the startRow to set the renderer on
renderer - the renderer to use for the row, null to remove the renderer if previously set
See Also:
setRowRenderer(int, TableRowRenderer), getRowRenderer(int)

getRowRenderer

public TableRowRenderer getRowRenderer(int row)
Returns an appropriate renderer for the row specified by this row. First it will check to see if a specific renderer has been set using the setRowRenderer method and returns thats. If not, returns the default row renderer for the TableView.

Parameters:
row - the row to render
Returns:
the assigned row renderer
See Also:
setRowRenderer(int, TableRowRenderer), setRowRenderer(int, int, int, TableRowRenderer)

getDefaultRenderer

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

Returns:
an instance of the TableCellRenderer

setCellRenderer

public void setCellRenderer(int row,
                            int column,
                            TableCellRenderer renderer)
Sets the cell renderer for the specific cell located at the row and column passed in. If either the row or column has a -1 value, the renderer is set for the entire row or column. If the renderer is null, it sets the renderer to be null, and will use the renderer set on the table column, or if that is also null, it will use the default renderer set on the table. If both -1 are passed in for the row and column, it sets the renderer for the entire table. If a renderer is set for an entire row, and then a different renderer is set for the same row, but a specific column, the second renderer will be used for that cell. The last renderer applied always wins. So if a bunch of renderers are set for rows, columns, and individual cells, and then a renderer is set for the entire table (-1 for row, -1 for column), the entire table will use the same renderer.

Parameters:
row - the row to set the renderer on, -1 if setting the renderer on the entire column is desired
column - the column to set the renderer on, -1 if setting the renderer on the entire row is desired
renderer - the renderer to use for the row and column, null to remove the renderer if previously set
See Also:
setCellRenderer(int, int, int, int, int, int, TableCellRenderer), getCellRenderer(int, int)

setCellRenderer

public void setCellRenderer(int startRow,
                            int endRow,
                            int repeatRowFactor,
                            int startColumn,
                            int endColumn,
                            int repeatColumnFactor,
                            TableCellRenderer renderer)
Sets the cell renderer for the specific cells located in the specified area determined by startRow, endRow, repeatRowFactor, startColumn, endColumn and repeatColumnFactor. The repeatRowFactor and repeatColumnFactor are used to specify every nth row or column after the startRow or startColumn to set the renderer on.

The valid values for startRow and startColumn are:

       start >= 1
 
The valid values for endRow and endColumn are:
       end >= start, or end == -1 for all rows/columns
 
The valid values for repeatRowFactor and repeatColumnFactor are:
       repeat >= 1
 

If the renderer is null, it sets the renderer for the specified area of cells to be null, and the tableview will use the renderer set on the table column, or if that is also null, the tableview will use the default renderer set on the tableview.

If a renderer is set for an entire row, and then a different renderer is set for the same row, but a specific column, the second renderer will be used for that cell. The last renderer applied always wins. So if a bunch of renderers are set for rows, columns, and individual cells, and then a renderer is set for the entire tableview (i.e. startRow=1, endRow=-1, repeatRowFactor=1, startColumn=1, endColumn=-1, repeatColumnFactor=1), then the entire tableview will use the same renderer.

Parameters:
startRow - the first row in the specified area to set the renderer on
endRow - the last row in the specified area to set the renderer on or -1 for all rows after startRow
repeatRowFactor - specifies every nth row after the startRow to set the renderer on
startColumn - the first column in the specified area to set the renderer on
endColumn - the last column in the specified area to set the renderer on or -1 for all columns after startColumn
repeatColumnFactor - specifies every nth column after the startColumn to set the renderer on
renderer - the renderer to use for specified area or null to remove the renderer for the specified area
See Also:
setCellRenderer(int, int, TableCellRenderer), getCellRenderer(int, int)

setCellRenderer

public void setCellRenderer(com.sas.swing.visuals.tableview.TableFormatAreaInterface area,
                            TableCellRenderer renderer)

getCellRenderer

public TableCellRenderer getCellRenderer(int row,
                                         int column)
Returns an appropriate renderer for the cell specified by this row and column. First it will check to see if a specific non-null renderer has been set using the setCellRenderer methods and returns that. If not, it then checks the TableColumn for the specific column to see if it has a non-null renderer, if so, returns that. If not, returns the default renderer for the TableView.

Note: Throughout the tableview package, the internal implementations always use this method to provide renderers so that this default behavior can be safely overridden by a subclass.

Parameters:
row - the row of the cell to render
column - the column of the cell to render
Returns:
the assigned renderer
See Also:
setCellRenderer(int, int, TableCellRenderer), setCellRenderer(int, int, int, int, int, int, TableCellRenderer)

setColumnHeaderAreaRenderer

public void setColumnHeaderAreaRenderer(com.sas.servlet.tbeans.tableview.ColumnHeaderAreaRenderer customRenderer)

getColumnHeaderAreaRenderer

public com.sas.servlet.tbeans.tableview.ColumnHeaderAreaRenderer getColumnHeaderAreaRenderer()

getDefaultEditor

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

Returns:
an instance of the TableCellRenderer

setCellEditor

public void setCellEditor(int row,
                          int column,
                          TableCellEditor editor)
Sets the cell editor for the specific cell located at the row and column passed in. If either the row or column has a -1 value, the editor is set for the entire row or column. If the editor is null, it sets the editor to be null, and will use the editor set on the table column, or if that is also null, it will use the default editor set on the table. If both -1 are passed in for the row and column, it sets the editor for the entire table. If a editor is set for an entire row, and then a different editor is set for the same row, but a specific column, the second editor will be used for that cell. The last editor applied always wins. So if a bunch of editors are set for rows, columns, and individual cells, and then a editor is set for the entire table (-1 for row, -1 for column), the entire table will use the same editor.

Parameters:
row - the row to set the editor on, -1 if setting the editor on the entire column is desired
column - the column to set the editor on, -1 if setting the editor on the entire row is desired
editor - the editor to use for the row and column, null to remove the editor if previously set
See Also:
setCellEditor(int, int, int, int, int, int, TableCellEditor), getCellEditor(int, int)

setCellEditor

public void setCellEditor(int startRow,
                          int endRow,
                          int repeatRowFactor,
                          int startColumn,
                          int endColumn,
                          int repeatColumnFactor,
                          TableCellEditor editor)
Sets the cell editor for the specific cells located in the specified area determined by startRow, endRow, repeatRowFactor, startColumn, endColumn and repeatColumnFactor. The repeatRowFactor and repeatColumnFactor are used to specify every nth row or column after the startRow or startColumn to set the editor on.

The valid values for startRow and startColumn are:

       start >= 1
 
The valid values for endRow and endColumn are:
       end >= start, or end == -1 for all rows/columns
 
The valid values for repeatRowFactor and repeatColumnFactor are:
       repeat >= 1
 

If the editor is null, it sets the editor for the specified area of cells to be null, and the tableview will use the editor set on the table column, or if that is also null, the tableview will use the default editor set on the tableview.

If a editor is set for an entire row, and then a different editor is set for the same row, but a specific column, the second editor will be used for that cell. The last editor applied always wins. So if a bunch of editors are set for rows, columns, and individual cells, and then a editor is set for the entire tableview (i.e. startRow=1, endRow=-1, repeatRowFactor=1, startColumn=1, endColumn=-1, repeatColumnFactor=1), then the entire tableview will use the same editor.

Parameters:
startRow - the first row in the specified area to set the editor on
endRow - the last row in the specified area to set the editor on or -1 for all rows after startRow
repeatRowFactor - specifies every nth row after the startRow to set the editor on
startColumn - the first column in the specified area to set the editor on
endColumn - the last column in the specified area to set the editor on or -1 for all columns after startColumn
repeatColumnFactor - specifies every nth column after the startColumn to set the editor on
editor - the editor to use for specified area or null to remove the editor for the specified area
See Also:
setCellEditor(int, int, TableCellEditor), getCellEditor(int, int)

setCellEditor

public void setCellEditor(com.sas.swing.visuals.tableview.TableFormatAreaInterface area,
                          TableCellEditor editor)

getCellEditor

public TableCellEditor getCellEditor(int row,
                                     int column)
Returns an appropriate editor for the cell specified by this row and column. First it will check to see if a specific non-null editor has been set using the setCellEditor methods and returns that. If not, it then checks the TableColumn for the specific column to see if it has a non-null editor, if so, returns that. If not, returns the default editor for the TableView.

Note: Throughout the tableview package, the internal implementations always use this method to provide editors so that this default behavior can be safely overridden by a subclass.

Parameters:
row - the row of the cell to edit
column - the column of the cell to edit
Returns:
the assigned editor
See Also:
setCellEditor(int, int, TableCellEditor), setCellEditor(int, int, int, int, int, int, TableCellEditor)

getNoRowsRenderer

public TableCellContentsRenderer getNoRowsRenderer()
Gets the cell content renderer to use for the TableView when there are no rows in the TableView or the model is not set.

Returns:
an instance of the TableCellContentsRenderer

setNoRowsRenderer

public void setNoRowsRenderer(TableCellContentsRenderer renderer)
Sets the cell content renderer to use for the TableView when there are no rows in the TableView or the model is not set.

Parameters:
renderer - an instance of the TableCellContentsRenderer

getDefaultNoRowsRenderer

public abstract TableCellContentsRenderer getDefaultNoRowsRenderer()
Gets the default cell content renderer to use for the TableView when there are no rows in the TableView or the model is not set.

Returns:
an instance of the TableCellContentsRenderer

cleanUpResources

public void cleanUpResources()
This method releases all of the necessary resources that were needed by the transformation bean to render itself. These resources include fields such as request and response. This method calls the setRequest and setResponse methods with a null value.

Overrides:
cleanUpResources in class BaseTransformation

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.

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

getColumnHeaderActions

protected ActionList getColumnHeaderActions(TableColumn column,
                                            java.lang.String header)
Returns the ActionList to be rendered as the column header for the given column. You should call resetColumnHeaderActions once the actions have been renderered.

Parameters:
column - The column to get the actions for. Should be an instance of TableColumn.
header - The name to use as the column's header.
Returns:
The list of actions for the given column.
See Also:
resetColumnHeaderActions()

resetColumnHeaderActions

protected void resetColumnHeaderActions()
Called after the actions from getColumnHeaderActions have been rendered to clear out the ActionList for the columnHeaderActions.

See Also:
getColumnHeaderActions(com.sas.servlet.tbeans.tableview.TableColumn, java.lang.String)

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.

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

writeRow

public void writeRow(int rowNumber,
                     java.io.Writer out)
              throws java.io.IOException
Writes a single row of the TableView. The data from the current row in the TableView will be used.

Parameters:
rowNumber - the 1-based row number to write
out - the output stream
Throws:
java.io.IOException - Thrown if some type of I/O error occurs

writeRow

public void writeRow(int rowNumber,
                     java.io.OutputStream out)
              throws java.io.IOException
Writes a single row of the TableView. The data from the current row in the TableView will be used.

Parameters:
rowNumber - the 1-based row number to write
out - the output stream
Throws:
java.io.IOException - Thrown if some type of I/O error occurs

writeRow

public void writeRow(int rowNumber,
                     java.io.PrintWriter out)
              throws java.io.IOException
Writes a single row of the TableView. The data from the current row in the TableView will be used.

Parameters:
rowNumber - the 1-based row number to write
out - the output stream
Throws:
java.io.IOException - Thrown if some type of I/O error occurs

getEditRowActions

protected ActionList getEditRowActions()
Returns the ActionList of edit actions for the EDITROW. The actions returned are for the TableViewAreaInterface.EDIT_ROW_AREA. You should call resetEditRowActions once the actions have been renderered.

Returns:
The list of actions for the EDITROW.
See Also:
resetEditRowActions()

resetEditRowActions

protected void resetEditRowActions()
Called after the actions from getEditRowActions have been rendered to clear out the ActionList for the editRowActions.

See Also:
getEditRowActions()

getEditColumnActions

protected ActionList getEditColumnActions(int rowNumber)
Returns the ActionList of edit actions for the given row. The actions returned are for the TableViewAreaInterface.EDIT_COLUMN_AREA. You should call resetEditColumnActions once the actions have been renderered.

Parameters:
rowNumber - The row used to return actions.
Returns:
The list of actions for the given row.
See Also:
resetEditColumnActions()

resetEditColumnActions

protected void resetEditColumnActions()
Called after the actions from getEditColumnActions have been rendered to clear out the ActionList for the editColumnActions.

See Also:
getEditColumnActions(int)

getDataCellActions

protected ActionList getDataCellActions(int rowNumber,
                                        int colModelIndex)
Returns the ActionList to be rendered as the cell for the given row and column coordinates. You should call resetDataCellActions once the actions have been renderered.

Parameters:
rowNumber - The data model's index for the row.
colModelIndex - The data model's index for the column.
Returns:
The list of actions for the given cell.
See Also:
resetDataCellActions()

resetDataCellActions

protected void resetDataCellActions()
Called after the actions from getDataCellActions have been rendered to clear out the ActionList for the dataCellActions.

See Also:
getDataCellActions(int, int)

getMultiColumnRuleCount

protected int getMultiColumnRuleCount()

initialize

public void initialize()
Initializes the TableView Object.

Specified by:
initialize in class AbstractBaseTableView

initializeRowNumbers

public void initializeRowNumbers()
Initializes the row numbers. The rows at the top of the table will be displayed. If for some reason values for startRow and endRow can not be determined (perhaps the model was not assigned), startRow and endRow are set to -1. Please do not call this method unless you are implementing your own scrolling capabilites and not using the default scrolling capabilities.


initializeColumnNumbers

public void initializeColumnNumbers()
Initializes the column numbers. The left most columns will be displayed. If for some reason values for startColumn and endColumn can not be determined(perhaps the model was not assigned), startColumn and endColumn are set to -1. Please do not call this method unless you are implementing your own scrolling capabilites and not using the default scrolling capabilities.


getRowCount

public int getRowCount()
Convenience method to return the number of rows available from the model or -1 if the model is not set.

Specified by:
getRowCount in interface RowNavigationInterface
Specified by:
getRowCount in class AbstractBaseTableView
Returns:
the number of rows available.

getColumnCount

public int getColumnCount()
Convenience method to return the number of columns in the column model. Note that this may be different from the number of columns in the data model. Returns -1 if the column model is not set.

Specified by:
getColumnCount in interface ColumnNavigationInterface
Specified by:
getColumnCount in class AbstractBaseTableView
Returns:
the number of columns in the table

isGotoRowSupported

public boolean isGotoRowSupported()
Determines whether navigation to any given row is supported. Returns true if scrolling forward and backward are supported.

Specified by:
isGotoRowSupported in interface RowNavigationInterface
Overrides:
isGotoRowSupported in class AbstractBaseTableView
Returns:
true if navigation to any given row is supported
See Also:
AbstractBaseTableView.gotoRow(int)

isGotoColumnSupported

public boolean isGotoColumnSupported()
Determines whether navigation to any given column is supported. Returns true if scrolling forward and backward is supported.

Specified by:
isGotoColumnSupported in interface ColumnNavigationInterface
Overrides:
isGotoColumnSupported in class AbstractBaseTableView
Returns:
true if navigation to any given column is supported
See Also:
AbstractBaseTableView.gotoColumn(int)

isAccurateRowCountAvailable

public boolean isAccurateRowCountAvailable()
Returns true if the actual row count is known. This is useful for data in which the row count is not known until the last observation is read.

Specified by:
isAccurateRowCountAvailable in interface AccurateRowCountInterface
Specified by:
isAccurateRowCountAvailable in class AbstractBaseTableView
Returns:
true if an accurate row count is available, false otherwise.
Throws:
java.lang.IllegalStateException - Thrown if the TableView's model has not yet been set.

tableChanged

public void tableChanged(javax.swing.event.TableModelEvent e)
Invoked when this table's TableModel generates a TableModelEvent. The TableModelEvent should be constructed in the coordinate system of the model. The appropriate mapping to the view coordinate system is performed by this TableView when it receives the event.

Application code will not use these methods explicitly, they are used internally by TableView.

Specified by:
tableChanged in interface javax.swing.event.TableModelListener
Parameters:
event - the TableModelEvent

isUpdateSupported

public boolean isUpdateSupported()
Determines whether updating a row is supported. Updating means moving the row from browse mode to edit mode.

Specified by:
isUpdateSupported in interface EditNavigationInterface
Returns:
true if updating a row is supported
See Also:
EditNavigationInterface.update(int)

isInsertSupported

public boolean isInsertSupported()
Determines whether inserting a row is supported.

Specified by:
isInsertSupported in interface EditNavigationInterface
Returns:
true if inserting a new row is supported
See Also:
EditNavigationInterface.insert(int)

isDeleteSupported

public boolean isDeleteSupported()
Determines whether deleting a row is supported.

Specified by:
isDeleteSupported in interface EditNavigationInterface
Returns:
true if deleting a row is supported
See Also:
EditNavigationInterface.delete(int)

isCommitSupported

public boolean isCommitSupported()
Determines whether commiting values is supported.

Specified by:
isCommitSupported in interface EditNavigationInterface
Returns:
true if commiting new values is supported
See Also:
EditNavigationInterface.commit()

isCancelSupported

public boolean isCancelSupported()
Determines whether canceling an edit change is supported.

Specified by:
isCancelSupported in interface EditNavigationInterface
Returns:
true if canceling a change is supported
See Also:
EditNavigationInterface.cancel()

***  This method is subject to change.  ***

isAutoCommit

public boolean isAutoCommit()
Determines whether changed values are committed automatically or the user is prompted to commit the changes.

Specified by:
isAutoCommit in interface EditNavigationInterface
Returns:
true to automatically commit changes

***  This method is subject to change.  ***

isPromptOnDelete

public boolean isPromptOnDelete()
Determines whether to prompt the user when deleting a row.

Specified by:
isPromptOnDelete in interface EditNavigationInterface
Returns:
true to prompt when deleting a row

delete

public void delete(int row)
Delete the given row. This method is used by the delete action when editing is being implemented by the TableView.

Specified by:
delete in interface EditNavigationInterface
Parameters:
row - the row to delete
Throws:
java.lang.UnsupportedOperationException - Thrown if isDeleteSupported() returns false
See Also:
isDeleteSupported()

insert

public void insert(int row)
Insert a row before the given row. If the given row number is equal to EditControllerInterface.DEFAULT_INDEX, then the row will be inserted at the default location in the data model. This method is used by the insert action when editing is being implemented by the TableView.

Specified by:
insert in interface EditNavigationInterface
Parameters:
row - the row to insert before
Throws:
java.lang.UnsupportedOperationException - Thrown if isInsertSupported() returns false
See Also:
isInsertSupported()

cancel

public void cancel()
Cancel any editing changes. This method is used by the cancel action when editing is being implemented by the TableView.

Specified by:
cancel in interface EditNavigationInterface
Throws:
java.lang.UnsupportedOperationException - Thrown if isCancelSupported() returns false
See Also:
isCancelSupported()

commit

public void commit()
Commit any editing changes. This method is used by the commit action when editing is being implemented by the TableView.

Specified by:
commit in interface EditNavigationInterface
Throws:
java.lang.UnsupportedOperationException - Thrown if isCommitSupported() returns false
See Also:
isCommitSupported()

update

public void update(int row)
Changes the given row from browse mode to edit mode. Once in edit mode you should be able to change values on the row and commit the changes. This method is used by the update action when editing is being implemented by the TableView.

Specified by:
update in interface EditNavigationInterface
Parameters:
row - the row to update
Throws:
java.lang.UnsupportedOperationException - Thrown if isUpdateSupported() returns false
See Also:
isUpdateSupported()

setUncommittedValues

public void setUncommittedValues(java.util.Map values)
Sets the map containing the name/value pairs of the editable fields that have changed and need to be committed. This method is called by the appropriate edit command on the TransformationBean implementing this interface. This method is needed as a way for the command to return the changed cell values from the request object to the TransformationBean. The edit command is responsible for getting the parameters off the request object and creating the map with the name/value pairs. The map keys are the names of the changed values and the corresponding map values are the new values.

Specified by:
setUncommittedValues in interface EditNavigationInterface
Parameters:
values - the map containing the name/value pairs of the editable fields that need to be committed
See Also:
getUncommittedValues()

getUncommittedValues

public java.util.Map getUncommittedValues()
Gets the map containing the name/value pairs of the editable fields that have changed and need to be committed. The edit command is responsible for getting the parameters off the request object and creating the map with the name/value pairs. The map keys are the names of the changed values and the corresponding map values are the new values.

Returns:
the map containing the name/value pairs of the editable fields that need to be committed
See Also:
setUncommittedValues(java.util.Map)

setRowsToDelete

public void setRowsToDelete(java.util.Map rows)
Sets the map containing the name/value pairs of the rows selected for deletion. This method is called by the appropriate edit command on the TransformationBean implementing this interface. This method is needed as a way for the command to return the selected rows from the request object to the TransformationBean. The edit command is responsible for getting the parameters off the request object and creating the map with the name/value pairs. The map keys are the names of the selected rows and the corresponding map values are the on\off values of the row selection component.

Specified by:
setRowsToDelete in interface EditNavigationInterface
Parameters:
values - the map containing the name/value pairs of the selected rows to be deleted
See Also:
getRowsToDelete()

getRowsToDelete

public java.util.Map getRowsToDelete()
Gets the map containing the name/value pairs of the rows selected for deletion. The edit command is responsible for getting the parameters off the request object and creating the map with the name/value pairs. The map keys are the names of the selected rows and the corresponding map values are the new are the on\off values of the row selection component.

Returns:
the map containing the name/value pairs of the selected rows to be deleted
See Also:
setRowsToDelete(java.util.Map)

getColumn

public TableColumn getColumn(java.lang.Object identifier)
Convenience method to get the column from the column model.

Parameters:
identifier - the identifier object
Returns:
the TableColumn object that matches the identifier
Throws:
java.lang.IllegalArgumentException - if identifier is null or no TableColumn has this identifier
See Also:
TableColumnModel.getColumn(int)

addColumn

public void addColumn(TableColumn column)
Convenience method to add the column to the column model.

Parameters:
column - the TableColumn to be added
Throws:
java.lang.IllegalStateException - Thrown if the TableView's model has not yet been set.
See Also:
TableColumnModel.addColumn(com.sas.servlet.tbeans.tableview.TableColumn)

removeColumn

public void removeColumn(TableColumn column)
Convenience method to remove a column from the column model.

Parameters:
column - the TableColumn to be removed
See Also:
TableColumnModel.removeColumn(com.sas.servlet.tbeans.tableview.TableColumn)

moveColumn

public void moveColumn(int column,
                       int targetColumn)
Convenience method to move a column in the column model. This method is a convenience method to the column model's moveColumn method. This method is 1-based.

Specified by:
moveColumn in interface com.sas.table.MoveColumnInterface
Parameters:
column - the index of column to be moved
targetColumn - the new index of the column
See Also:
TableColumnModel.moveColumn(int, int)

columnAdded

public void columnAdded(TableColumnModelEvent event)
Invoked when a column is added to the table column model.

Specified by:
columnAdded in interface TableColumnModelListener
Parameters:
event - the event received
See Also:
TableColumnModelListener

columnRemoved

public void columnRemoved(TableColumnModelEvent event)
Invoked when a column is removed from the table column model.

Specified by:
columnRemoved in interface TableColumnModelListener
Parameters:
event - the event received
See Also:
TableColumnModelListener

columnMoved

public void columnMoved(TableColumnModelEvent event)
Invoked when a column is moved in the table column model.

Specified by:
columnMoved in interface TableColumnModelListener
Parameters:
event - the event received
See Also:
TableColumnModelListener

getRowSelectionColumn

public TableColumn getRowSelectionColumn()
Returns the instance of TableColumn used to represent a column, independent of the data, that can be used to select rows in the TableView. If the rowSelectionColumn is not set then the defaultRowSelectionColumn is returned. 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 TableColumn's identifier must be set to TABLEVIEW_ROW_SELECTION for the rowSelectionColumn to render correctly.

Returns:
the TableColumn used to represent a column that will allow row selection
See Also:
setRowSelectionColumn(com.sas.servlet.tbeans.tableview.TableColumn), setRowSelectionMode(int), getRowSelectionMode()

setRowSelectionColumn

public void setRowSelectionColumn(TableColumn column)
Sets an 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 TableColumn's identifier must be set to TABLEVIEW_ROW_SELECTION for the rowSelectionColumn to render correctly.

Parameters:
column - the TableColumn used to represent a column that will allow row selection
See Also:
getRowSelectionColumn(), setRowSelectionMode(int), getRowSelectionMode()

getDefaultRowSelectionColumn

public abstract 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 TableColumn's identifier must be set to TABLEVIEW_ROW_SELECTION for the rowSelectionColumn to render correctly.

Returns:
the TableColumn used to represent a column that will allow row selection
See Also:
setRowSelectionMode(int), getRowSelectionMode()

getEditColumn

public TableColumn getEditColumn()
Returns an 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 TableColumn's identifier must be set to TABLEVIEW_EDIT_COLUMN for all editing action to be rendered by this TableColumn.

Returns:
the TableColumn used to render edit actions for the TableView's EDIT_COLUMN_AREA

setEditColumn

public void setEditColumn(TableColumn column)
Sets the 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 TableColumn's identifier must be set to TABLEVIEW_EDIT_COLUMN for all editing action to be rendered by this TableColumn.


getDefaultEditColumn

public abstract 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 TableColumn's identifier must be set to TABLEVIEW_EDIT_COLUMN for all editing action to be rendered by this TableColumn.

Returns:
the TableColumn used to render edit actions for the TableView's EDIT_COLUMN_AREA

setLocale

public void setLocale(java.util.Locale loc)
Set the locale on the TableView and all the classes used by the TableView.

Specified by:
setLocale in interface TransformationInterface
Overrides:
setLocale in class BaseTransformation
Parameters:
loc - an instance of java.util.Locale

lastRow

public void lastRow()
Navigates to the last row.

Specified by:
lastRow in interface RowNavigationInterface
Overrides:
lastRow in class AbstractBaseTableView
Throws:
java.lang.UnsupportedOperationException - Thrown if isLastRowSupported() returns false
See Also:
AbstractBaseTableView.isLastRowSupported()

gotoRow

public void gotoRow(int row)
Navigates to the given row.

Specified by:
gotoRow in interface RowNavigationInterface
Overrides:
gotoRow in class AbstractBaseTableView
Parameters:
row - the row index
Throws:
java.lang.UnsupportedOperationException - Thrown if isGotoRowSupported() returns false
See Also:
isGotoRowSupported()

isColumnMoveAllowed

public boolean isColumnMoveAllowed(int columnIndex,
                                   int newIndex)
Check to see if the column at columnIndex can be moved to newIndex. The column indices are 1-based.

Specified by:
isColumnMoveAllowed in interface com.sas.table.MoveColumnInterface
Parameters:
columnIndex - The index of the column to be moved.
newIndex - The index of the column's new location.
Returns:
true if the column can be moved to the new location

getColumnScrollSize

public int getColumnScrollSize()
Description copied from class: AbstractBaseTableView
Return the number of columns to scroll when paging forward/backward.

Overrides:
getColumnScrollSize in class AbstractBaseTableView

isCellIdsGenerated

public boolean isCellIdsGenerated()
Returns true if the TableView's cells should have an id property generated. Returns false by default.

Returns:
Returns the cellIdsGenerated.

setCellIdsGenerated

public void setCellIdsGenerated(boolean cellIdsGenerated)
Sets whether the TableView's cells should have an id property generated. Returns false by default.

Parameters:
cellIdsGenerated - The cellIdsGenerated to set.

write

public void write(java.io.PrintWriter out)
           throws java.io.IOException
Description copied from class: BaseActionTransformation2
Writes the full version of the transformation which includes the following content:

Specified by:
write in interface TransformationInterface
Specified by:
write in interface com.sas.util.WriteToPrintWriterInterface
Overrides:
write in class com.sas.servlet.tbeans.BaseActionTransformation2
Parameters:
out - The output stream to which the full content is written.
Throws:
java.io.IOException - Thrown if some type of I/O error occurs
See Also:
#preWrite(PrintWriter), BaseActionTransformation2.writeContent(PrintWriter), #postWrite(PrintWriter)

writeContent

protected void writeContent(java.io.PrintWriter out)
                     throws java.io.IOException
Description copied from class: BaseActionTransformation2
Writes the transformation's main content which is everything except for the following:

Overrides:
writeContent in class AbstractBaseTableView
Throws:
java.io.IOException
See Also:
BaseActionTransformation2.write(PrintWriter)

isExportNumericCustomFormattedValuesAsText

public boolean isExportNumericCustomFormattedValuesAsText(int colModelIndex)
Returns true if, for a specific column, numeric custom formatted values should be exported as text to Excel, false otherwise.


getColumnsToExportAsTextIfCustomFormatted

protected java.lang.String[] getColumnsToExportAsTextIfCustomFormatted(com.sas.iquery.metadata.business.DataItem[] dataItems)

***  This class contains elements that are subject to change.  ***




Copyright © 2009 SAS Institute Inc. All Rights Reserved.