com.sas.servlet.tbeans.tableview
Class AbstractBaseTableView

com.sas.servlet.tbeans.tableview.AbstractBaseTableView
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, RowNavigationInterface, RenderableInterface, TransformationInterface, com.sas.servlet.tbeans.TransformationInterface2, AccurateRowCountInterface, com.sas.util.WriteToPrintWriterInterface, java.io.Serializable, javax.swing.SwingConstants
Direct Known Subclasses:
BaseOLAPTableView, BaseTableView

public abstract class AbstractBaseTableView
implements RowNavigationInterface, ColumnNavigationInterface, HttpConstants, ComplexStyleInterface, com.sas.servlet.tbeans.features.FeatureListInterface

The abstract Transformation Bean base object for creating any TableView.

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
static boolean DEFAULT_EXPORT_NUMERIC_CUSTOM_FORMATED_VALUES_AS_TEXT
           
static int WRAP_ALL
           
static int WRAP_NONE
           
static int 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
AbstractBaseTableView()
          Constructs a new default TableView.
 
Method Summary
 void addFeature(com.sas.servlet.tbeans.features.Feature feature)
          Deprecated. Use getFeatures().add(feature) instead.
protected  void addMoveMenu(TableCellRenderer renderer, ActionList actions)
           
 void firstColumn()
          Navigates to the first column.
 void firstRow()
          Navigates to the first row.
 int getBorderWidth()
          Gets the width of the outer border around the table.
 java.lang.String getCaption()
          Returns the <caption> tag for the table.
 int getCellPadding()
          Gets the number of pixels between the border of a cell and the cell's contents.
 int getCellSpacing()
          Gets the number of pixels between the border of each cell.
abstract  int getColumnCount()
          Convenience method to return the number of viewable columns.
 int getColumnPageSize()
          Returns the number of columns to display per page.
 int getColumnScrollSize()
          Return the number of columns to scroll when paging forward/backward.
 int getEndColumn()
          Returns the column number of the last column to be displayed in the TableView.
 int getEndRow()
          Returns the row number of the last row to be displayed in the TableView.
 java.lang.String getFormName()
          Gets the name of the form that is to be submitted when form submission is used to executed actions within the TableView.
 int getHorizontalAlignment()
          Returns the horizontal alignment of the table.
abstract  int getRowCount()
          Convenience method to return the number of rows available from the model or -1 if the model is not set.
 int getRowPageSize()
          Returns the number of rows to display per page.
 com.sas.rpf.Context getRulesContext()
          Gets the Context used by the Rules Processing framework for conditional formatting of cells.
 int getStartColumn()
          Returns the column number of the first column to be displayed in the TableView.
 int getStartRow()
          Returns the row number of the first row to be displayed in the TableView.
 java.util.Map getStyleMap()
          Returns a Map containing all the style information for this component.
 java.lang.String getSummary()
          Returns the summary attribute of the table.
 int getTextWrapping()
          Get locations where text wrapping is on
 int getWidth()
          Gets the width of the table in pixels.
 int getWidthPercentage()
          Gets the width of the table as a percentage.
 void gotoColumn(int column)
          Navigates to the given column.
 void gotoRow(int row)
          Navigates to the given row.
abstract  void initialize()
          Initialize the TableView Object.
abstract  boolean isAccurateRowCountAvailable()
          Indicates whether an accurate row count is available.
 boolean isAllActionsVisible()
          Return a boolean to indicate whether actions on the TableView will be visible.
 boolean isColumnHeaderVisible()
          Returns true if column header should be visible.
 boolean isColumnsResizable()
          Determines whether resizing of columns is supported.
 boolean isFirstColumnSupported()
          Determines whether navigation to the first column is supported.
 boolean isFirstRowSupported()
          Determines whether navigation to the first row is supported.
 boolean isGotoColumnSupported()
          Determines whether navigation to jump to a specified column is supported.
 boolean isGotoRowSupported()
          Determines whether navigation to jump to a specified row is supported.
 boolean isLastColumnSupported()
          Determines whether navigation to the last column is supported.
 boolean isLastRowSupported()
          Determines whether navigation to the last row is supported.
 boolean isNextColumnSupported()
          Determines whether navigation to the next column is supported.
 boolean isNextRowSupported()
          Determines whether navigation to the next row is supported.
 boolean isPageBackwardColumnsSupported()
          Determines whether navigation back a page of columns is supported.
 boolean isPageBackwardRowsSupported()
          Determines whether navigation back a page of rows is supported.
 boolean isPageForwardColumnsSupported()
          Determines whether navigation forward a page of columns is supported.
 boolean isPageForwardRowsSupported()
          Determines whether navigation forward a page of rows is supported.
 boolean isPreviousColumnSupported()
          Determines whether navigation to the previous column is supported.
 boolean isPreviousRowSupported()
          Determines whether navigation to the previous row is supported.
 boolean isRowHeaderVisible()
          Returns true if row header should be visible.
 void lastColumn()
          Navigates to the last column.
 void lastRow()
          Navigates to the last row.
 void nextColumn()
          Navigates to the next column.
 void nextRow()
          Navigates to the next row.
 void pageBackwardColumns()
          Navigates backward a page of columns.
 void pageBackwardRows()
          Navigates backward a page of rows.
 void pageForwardColumns()
          Navigates forward a page of columns.
 void pageForwardRows()
          Navigates forward a page of rows.
 void previousColumn()
          Navigates to the previous column.
 void previousRow()
          Navigates to the previous row.
protected  StyleInfo removeLastBorder(TableCellRenderer renderer, int col, int row, StyleInfo savedStyle)
          Add style information to remove the right/bottom border if on the last column/row.
 void setAllActionsVisible(boolean visible)
          Sets whether actions on the TableView will be visible.
 void setBorderWidth(int border)
          Sets the width of the outer border around the table in pixels.
 void setCaption(java.lang.String caption)
          Sets the text to be used as the <caption> tag.
 void setCellPadding(int padding)
          Sets the number of pixels between the border of a cell and the cell's contents.
 void setCellSpacing(int spacing)
          Sets the number of pixels between the border of each cell.
 void setColumnHeaderVisible(boolean visible)
          Turns on/off the use of the column header.
 void setColumnPageSize(int columns)
          Sets the number of columns to display per page.
 void setColumnsResizable(boolean columnsResizable)
          Sets whether resizing of columns is supported.
 void setEndColumn(int end)
          Sets the last column to be displayed.
 void setEndRow(int end)
          Set the last row to be displayed.
 void setHorizontalAlignment(int alignment)
          Sets the horizontal alignment of the table.
 void setPageSize(int rows, int columns)
          Sets the number of rows and columns to display per page.
 void setRowHeaderVisible(boolean visible)
          Turns on/off the use of the row header.
 void setRowPageSize(int rows)
          Sets the number of rows to display per page.
 void setRulesContext(com.sas.rpf.Context rulesContext)
          Sets the Context used by the Rules Processing framework for conditional formatting of cells.
 void setStartColumn(int start)
          Sets the first column to be displayed.
 void setStartRow(int start)
          Set the first row to be displayed.
 void setSummary(java.lang.String summary)
          Sets the text to be used as the summary attribute of the table.
 void setTextWrapping(int textWrapping)
          Set locations where text wrapping is on
 void setWidth(int width)
          Sets the width of the table in pixels.
 void setWidthPercentage(int percentage)
          Sets the width of the table as a percentage.
 void writeColumnHeader(java.io.OutputStream out)
          Writes the row of the tableview which contains the column headers.
abstract  void writeColumnHeader(java.io.PrintWriter out)
          Writes the row of the tableview which contains the column headers.
 void writeColumnHeader(java.io.Writer out)
          Writes the row of the tableview which contains the column headers.
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 writeEmptyTable(java.io.OutputStream out)
          Writes an empty table when a model is not attached or the data model contains no rows.
abstract  void writeEmptyTable(java.io.PrintWriter out)
          Writes an empty table when a model is not attached or the data model contains no rows.
 void writeEmptyTable(java.io.Writer out)
          Writes an empty table when a model is not attached or the data model contains no rows.
protected  void writeFeatures(javax.servlet.http.HttpServletRequest request, java.io.PrintWriter out)
          Write all the features in the feature list.
protected  void writeRows(java.io.OutputStream out)
          Writes the rows of data for the tableview.
protected abstract  void writeRows(java.io.PrintWriter out)
          Writes the rows of data for the tableview.
protected  void writeRows(java.io.Writer out)
          Writes the rows of data for the tableview.
 void writeTableFooter(java.io.OutputStream out)
          Writes the footer tag for the tableview.
abstract  void writeTableFooter(java.io.PrintWriter out)
          Writes the footer tag for the tableview.
 void writeTableFooter(java.io.Writer out)
          Writes the footer tag for the tableview.
 void writeTableHeader(java.io.OutputStream out)
          Writes the header tag and all its attributes for tableview.
abstract  void writeTableHeader(java.io.PrintWriter out)
          Writes the header tag and all its attributes for tableview.
 void writeTableHeader(java.io.Writer out)
          Writes the header tag and all its attributes for tableview.
protected  void writeTableTFoot(java.io.PrintWriter out)
           
 
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, cleanUpResources, 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, setLocale, 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, setLocale, setName, setRequest, setResponse, setTagEpilog, setTagProlog, setVisible, write, write, write
 
Methods inherited from interface com.sas.actionprovider.HttpActionProviderViewInterface
getRequest, setRequest
 

Field Detail

WRAP_NONE

public static final int WRAP_NONE
See Also:
Constant Field Values

WRAP_ALL

public static final int WRAP_ALL
See Also:
Constant Field Values

WRAP_PER_COLUMN

public static final int WRAP_PER_COLUMN
See Also:
Constant Field Values

DEFAULT_EXPORT_NUMERIC_CUSTOM_FORMATED_VALUES_AS_TEXT

public static boolean DEFAULT_EXPORT_NUMERIC_CUSTOM_FORMATED_VALUES_AS_TEXT
Constructor Detail

AbstractBaseTableView

public AbstractBaseTableView()
Constructs a new default TableView.

Method Detail

initialize

public abstract void initialize()
Initialize the TableView Object.


writeTableHeader

public void writeTableHeader(java.io.Writer out)
                      throws java.io.IOException
Writes the header tag and all its attributes for tableview. For example, in html this method would generate the html <table> tag.

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

writeTableHeader

public void writeTableHeader(java.io.OutputStream out)
                      throws java.io.IOException
Writes the header tag and all its attributes for tableview. For example, in html this method would generate the html <table> tag.

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

writeTableHeader

public abstract void writeTableHeader(java.io.PrintWriter out)
                               throws java.io.IOException
Writes the header tag and all its attributes for tableview. For example, in html this method would generate the html <table> tag.

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

writeColumnHeader

public void writeColumnHeader(java.io.Writer out)
                       throws java.io.IOException
Writes the row of the tableview which contains the column headers.

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

writeColumnHeader

public void writeColumnHeader(java.io.OutputStream out)
                       throws java.io.IOException
Writes the row of the tableview which contains the column headers.

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

writeColumnHeader

public abstract void writeColumnHeader(java.io.PrintWriter out)
                                throws java.io.IOException
Writes the row of the tableview which contains the column headers.

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

writeRows

protected void writeRows(java.io.Writer out)
                  throws java.io.IOException
Writes the rows of data for the tableview. This method will also write out the rowHeaders for each row.

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

writeRows

protected void writeRows(java.io.OutputStream out)
                  throws java.io.IOException
Writes the rows of data for the tableview. This method will also write out the rowHeaders for each row.

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

writeRows

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

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

writeTableFooter

public void writeTableFooter(java.io.Writer out)
                      throws java.io.IOException
Writes the footer tag for the tableview. For example, in html this method would generate the html </table> tag.

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

writeTableFooter

public void writeTableFooter(java.io.OutputStream out)
                      throws java.io.IOException
Writes the footer tag for the tableview. For example, in html this method would generate the html </table> tag.

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

writeTableFooter

public abstract void writeTableFooter(java.io.PrintWriter out)
                               throws java.io.IOException
Writes the footer tag for the tableview. For example, in html this method would generate the html </table> tag.

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

writeEmptyTable

public void writeEmptyTable(java.io.Writer out)
                     throws java.io.IOException
Writes an empty table when a model is not attached or the data model contains no rows.

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

writeEmptyTable

public void writeEmptyTable(java.io.OutputStream out)
                     throws java.io.IOException
Writes an empty table when a model is not attached or the data model contains no rows.

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

writeEmptyTable

public abstract void writeEmptyTable(java.io.PrintWriter out)
                              throws java.io.IOException
Writes an empty table when a model is not attached or the data model contains no rows.

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

getStyleMap

public java.util.Map getStyleMap()
Returns a Map containing all the style information for this component.

Specified by:
getStyleMap in interface ComplexStyleInterface
Returns:
Map containing all component style information

isFirstRowSupported

public boolean isFirstRowSupported()
Determines whether navigation to the first row is supported.

Specified by:
isFirstRowSupported in interface RowNavigationInterface
Returns:
true if navigation to the first row is supported
See Also:
firstRow()

isPageBackwardRowsSupported

public boolean isPageBackwardRowsSupported()
Determines whether navigation back a page of rows is supported.

Specified by:
isPageBackwardRowsSupported in interface RowNavigationInterface
Returns:
true if navigation back a page of rows is supported
See Also:
pageBackwardRows()

isPreviousRowSupported

public boolean isPreviousRowSupported()
Determines whether navigation to the previous row is supported.

Specified by:
isPreviousRowSupported in interface RowNavigationInterface
Returns:
true if navigation to the previous row is supported
See Also:
previousRow()

isNextRowSupported

public boolean isNextRowSupported()
Determines whether navigation to the next row is supported.

Specified by:
isNextRowSupported in interface RowNavigationInterface
Returns:
true if navigating to the next row is supported
See Also:
nextRow()

isPageForwardRowsSupported

public boolean isPageForwardRowsSupported()
Determines whether navigation forward a page of rows is supported.

Specified by:
isPageForwardRowsSupported in interface RowNavigationInterface
Returns:
true if navigation forward a page of rows is supported
See Also:
pageForwardRows()

isLastRowSupported

public boolean isLastRowSupported()
Determines whether navigation to the last row is supported.

Specified by:
isLastRowSupported in interface RowNavigationInterface
Returns:
true if navigation to the last row is supported
See Also:
lastRow()

isGotoRowSupported

public boolean isGotoRowSupported()
Determines whether navigation to jump to a specified row is supported.

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

firstRow

public void firstRow()
Navigates to the first row.

Specified by:
firstRow in interface RowNavigationInterface
Throws:
java.lang.UnsupportedOperationException - Thrown if isFirstRowSupported() returns false
See Also:
isFirstRowSupported()

pageBackwardRows

public void pageBackwardRows()
Navigates backward a page of rows.

Specified by:
pageBackwardRows in interface RowNavigationInterface
Throws:
java.lang.UnsupportedOperationException - Thrown if isPageBackwardRowsSupported() returns false
See Also:
isPageBackwardRowsSupported()

previousRow

public void previousRow()
Navigates to the previous row.

Specified by:
previousRow in interface RowNavigationInterface
Throws:
java.lang.UnsupportedOperationException - Thrown if isPreviousRowSupported() returns false
See Also:
isPreviousRowSupported()

nextRow

public void nextRow()
Navigates to the next row.

Specified by:
nextRow in interface RowNavigationInterface
Throws:
java.lang.UnsupportedOperationException - Thrown if isNextRowSupported() returns false
See Also:
isNextRowSupported()

pageForwardRows

public void pageForwardRows()
Navigates forward a page of rows.

Specified by:
pageForwardRows in interface RowNavigationInterface
Throws:
java.lang.UnsupportedOperationException - Thrown if isPageForwardRowsSupported() returns false
See Also:
isPageForwardRowsSupported()

lastRow

public void lastRow()
Navigates to the last row.

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

gotoRow

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

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

getStartRow

public int getStartRow()
Returns the row number of the first row to be displayed in the TableView. This number is 0-based.

Specified by:
getStartRow in interface RowNavigationInterface
Returns:
first row to be displayed in the TableView

setStartRow

public void setStartRow(int start)
Set the first row to be displayed. This method should only be called if the developer is implementing their own scrolling capabilities and not using the default scrolling capabilities. This number is 0-based.

Parameters:
start - first row to be displayed in the TableView

getEndRow

public int getEndRow()
Returns the row number of the last row to be displayed in the TableView. This number is 0-based.

Specified by:
getEndRow in interface RowNavigationInterface
Returns:
last row to be displayed in the TableView

setEndRow

public void setEndRow(int end)
Set the last row to be displayed. This method should only be called if the developer is implementing their own scrolling capabilities and not using the default scrolling capabilities. This number is 0-based.

Parameters:
end - last row to be displayed in the TableView

getRowCount

public abstract 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
Returns:
the number of rows available.

getRowPageSize

public int getRowPageSize()
Returns the number of rows to display per page. Returns -1 if all rows are to be displayed.

Specified by:
getRowPageSize in interface RowNavigationInterface
Returns:
the number of rows to display per page

setRowPageSize

public void setRowPageSize(int rows)
Sets the number of rows to display per page. This method also initializes the table when sets. Set to -1 to display all rows.

Specified by:
setRowPageSize in interface RowNavigationInterface
Parameters:
rows - the number of rows to display per page

isAccurateRowCountAvailable

public abstract boolean isAccurateRowCountAvailable()
Indicates whether an accurate row count is available.

Specified by:
isAccurateRowCountAvailable in interface AccurateRowCountInterface
Returns:
true if an accurate row count is available, false otherwise.

getFormName

public java.lang.String getFormName()
Gets the name of the form that is to be submitted when form submission is used to executed actions within the TableView. Returns null if no form is used, thus disabling form submission.

Specified by:
getFormName in interface ColumnNavigationInterface
Specified by:
getFormName in interface RowNavigationInterface
Returns:
the name of the form to be submitted or null if no form is used.

getColumnScrollSize

public int getColumnScrollSize()
Return the number of columns to scroll when paging forward/backward.


isFirstColumnSupported

public boolean isFirstColumnSupported()
Determines whether navigation to the first column is supported.

Specified by:
isFirstColumnSupported in interface ColumnNavigationInterface
Returns:
true if navigation to the first column is supported
See Also:
firstColumn()

isPageBackwardColumnsSupported

public boolean isPageBackwardColumnsSupported()
Determines whether navigation back a page of columns is supported.

Specified by:
isPageBackwardColumnsSupported in interface ColumnNavigationInterface
Returns:
true if navigation back a page of columns is supported
See Also:
pageBackwardColumns()

isPreviousColumnSupported

public boolean isPreviousColumnSupported()
Determines whether navigation to the previous column is supported.

Specified by:
isPreviousColumnSupported in interface ColumnNavigationInterface
Returns:
true if navigation to the previous column is supported
See Also:
previousColumn()

isNextColumnSupported

public boolean isNextColumnSupported()
Determines whether navigation to the next column is supported.

Specified by:
isNextColumnSupported in interface ColumnNavigationInterface
Returns:
true if navigation to the next column is supported
See Also:
nextColumn()

isPageForwardColumnsSupported

public boolean isPageForwardColumnsSupported()
Determines whether navigation forward a page of columns is supported.

Specified by:
isPageForwardColumnsSupported in interface ColumnNavigationInterface
Returns:
true if navigation forward a page of columns is supported
See Also:
pageForwardColumns()

isLastColumnSupported

public boolean isLastColumnSupported()
Determines whether navigation to the last column is supported.

Specified by:
isLastColumnSupported in interface ColumnNavigationInterface
Returns:
true if navigation to the last column is supported See #lastColumn
See Also:
ColumnNavigationInterface.lastColumn()

isGotoColumnSupported

public boolean isGotoColumnSupported()
Determines whether navigation to jump to a specified column is supported.

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

firstColumn

public void firstColumn()
Navigates to the first column.

Specified by:
firstColumn in interface ColumnNavigationInterface
Throws:
java.lang.UnsupportedOperationException - Thrown if isFirstColumnSupported() returns false
See Also:
isFirstColumnSupported()

pageBackwardColumns

public void pageBackwardColumns()
Navigates backward a page of columns.

Specified by:
pageBackwardColumns in interface ColumnNavigationInterface
Throws:
java.lang.UnsupportedOperationException - Thrown if isPageBackwardColumnsSupported() returns false
See Also:
isPageBackwardColumnsSupported()

previousColumn

public void previousColumn()
Navigates to the previous column.

Specified by:
previousColumn in interface ColumnNavigationInterface
Throws:
java.lang.UnsupportedOperationException - Thrown if isPreviousColumnSupported() returns false
See Also:
isPreviousColumnSupported()

nextColumn

public void nextColumn()
Navigates to the next column.

Specified by:
nextColumn in interface ColumnNavigationInterface
Throws:
java.lang.UnsupportedOperationException - Thrown if isNextColumnSupported() returns false
See Also:
isNextColumnSupported()

pageForwardColumns

public void pageForwardColumns()
Navigates forward a page of columns.

Specified by:
pageForwardColumns in interface ColumnNavigationInterface
Throws:
java.lang.UnsupportedOperationException - Thrown if isPageForwardColumnsSupported() returns false
See Also:
isPageForwardColumnsSupported()

lastColumn

public void lastColumn()
Navigates to the last column.

Specified by:
lastColumn in interface ColumnNavigationInterface
Throws:
java.lang.UnsupportedOperationException - Thrown if isLastColumnSupported() returns false
See Also:
isLastColumnSupported()

gotoColumn

public void gotoColumn(int column)
Navigates to the given column.

Specified by:
gotoColumn in interface ColumnNavigationInterface
Parameters:
column - the column index
Throws:
java.lang.UnsupportedOperationException - Thrown if isGotoColumnSupported() returns false
See Also:
isGotoColumnSupported()

getStartColumn

public int getStartColumn()
Returns the column number of the first column to be displayed in the TableView. This number is 0-based.

Specified by:
getStartColumn in interface ColumnNavigationInterface
Returns:
first column to be displayed in the TableView

setStartColumn

public void setStartColumn(int start)
Sets the first column to be displayed. This method should only be called if the developer is implementing their own scrolling capabilities and not using the default scrolling capabilities. This number is 0-based.

Parameters:
start - first column to be displayed in the TableView

getEndColumn

public int getEndColumn()
Returns the column number of the last column to be displayed in the TableView. This number is 0-based.

Specified by:
getEndColumn in interface ColumnNavigationInterface
Returns:
last column to be displayed in the TableView.

setEndColumn

public void setEndColumn(int end)
Sets the last column to be displayed. This method should only be called if the developer is implementing their own scrolling capabilities and not using the default scrolling capabilities. This number is 0-based.

Parameters:
end - last column to be displayed in the TableView

getColumnCount

public abstract int getColumnCount()
Convenience method to return the number of viewable columns.

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

getColumnPageSize

public int getColumnPageSize()
Returns the number of columns to display per page.

Specified by:
getColumnPageSize in interface ColumnNavigationInterface
Returns:
the number of columns to display per page

setColumnPageSize

public void setColumnPageSize(int columns)
Sets the number of columns to display per page. This method also initializes the table when set. Set to -1 to display all columns.

Specified by:
setColumnPageSize in interface ColumnNavigationInterface
Parameters:
columns - the number of columns to display per page

setPageSize

public void setPageSize(int rows,
                        int columns)
Sets the number of rows and columns to display per page.

Parameters:
rows - the number of rows to display per page
columns - the number of columns to display per page

getBorderWidth

public int getBorderWidth()
Gets the width of the outer border around the table.

Returns:
the border width in pixels

setBorderWidth

public void setBorderWidth(int border)
Sets the width of the outer border around the table in pixels. The default is 0.

Parameters:
width - the border width in pixels
Throws:
java.lang.IllegalArgumentException - if border < 0

getCellSpacing

public int getCellSpacing()
Gets the number of pixels between the border of each cell.

Returns:
the number of pixels between each cell

setCellSpacing

public void setCellSpacing(int spacing)
Sets the number of pixels between the border of each cell. The default is 0.

Parameters:
spacing - the number of pixels between each cell
Throws:
java.lang.IllegalArgumentException - if spacing < 0

getCellPadding

public int getCellPadding()
Gets the number of pixels between the border of a cell and the cell's contents. The default is 3.

Returns:
the number of pixels between the cell border and the cell content

setCellPadding

public void setCellPadding(int padding)
Sets the number of pixels between the border of a cell and the cell's contents.

Parameters:
padding - the number of pixels between the cell border and the cell content
Throws:
java.lang.IllegalArgumentException - if padding < 0

getWidth

public int getWidth()
Gets the width of the table in pixels. Returns 0 if not set. Overrides widthPercentage if both are set.

Returns:
the width in pixels

setWidth

public void setWidth(int width)
Sets the width of the table in pixels. Overrides widthPercentage if both are set.

Parameters:
width - the width in pixels
Throws:
java.lang.IllegalArgumentException - if width < 0

getWidthPercentage

public int getWidthPercentage()
Gets the width of the table as a percentage. Returns 0 if not set.

Returns:
the width as a percentage

setWidthPercentage

public void setWidthPercentage(int percentage)
Sets the width of the table as a percentage.

Parameters:
percentage - the width as a percentage
Throws:
java.lang.IllegalArgumentException - if percentage < 0

getHorizontalAlignment

public int getHorizontalAlignment()
Returns the horizontal alignment of the table. The default is NONE, which means no justification is specified.

Returns:
the position of the table on the page

setHorizontalAlignment

public void setHorizontalAlignment(int alignment)
Sets the horizontal alignment of the table. Valid values are LEFT, CENTER, RIGHT and NONE.

Parameters:
alignment - the position of the table on the page
Throws:
java.lang.IllegalArgumentException - if alignment is invalid

getSummary

public java.lang.String getSummary()
Returns the summary attribute of the table. If a value is not assigned then null is returned. The summary should briefly describe the structure and purpose of the table.

Returns:
a brief description of the structure and purpose of the table

setSummary

public void setSummary(java.lang.String summary)
Sets the text to be used as the summary attribute of the table. The summary should briefly describe the structure and purpose of the table.

Parameters:
summary - a brief description of the structure and purpose of the table

getCaption

public java.lang.String getCaption()
Returns the <caption> tag for the table. If a value is not assigned then null is returned. The caption should be a brief description to describe the nature of the table. This is primarily needed for html implementations of the TableView.

Returns:
a brief description to describe the nature of the table

setCaption

public void setCaption(java.lang.String caption)
Sets the text to be used as the <caption> tag. The caption should be a brief description to describe the nature of the table. This is primarily needed for html implementations of the TableView.

Parameters:
caption - a brief description to describe the nature of the table

isColumnHeaderVisible

public boolean isColumnHeaderVisible()
Returns true if column header should be visible. Column header is true by default.

Returns:
true if column header should be visible
See Also:
setColumnHeaderVisible(boolean)

setColumnHeaderVisible

public void setColumnHeaderVisible(boolean visible)
Turns on/off the use of the column header. The default is true.

Parameters:
visible - true if column header should be visible
See Also:
isColumnHeaderVisible()

isRowHeaderVisible

public boolean isRowHeaderVisible()
Returns true if row header should be visible. Row header is true by default.

Returns:
true if row header should be visible
See Also:
setRowHeaderVisible(boolean)

setRowHeaderVisible

public void setRowHeaderVisible(boolean visible)
Turns on/off the use of the row header. The default is true.

Parameters:
visible - true if header should be visible
See Also:
isRowHeaderVisible()

setAllActionsVisible

public void setAllActionsVisible(boolean visible)
Sets whether actions on the TableView will be visible. If set to true, then the visible method for a particular action must be checked to determine if the action is visible. If set to false, then all actions will be non-visible and all the actions' visible methods will return false.

Parameters:
visible - true if actions on the table are to be visible

isAllActionsVisible

public boolean isAllActionsVisible()
Return a boolean to indicate whether actions on the TableView will be visible. If true, then the visible method for a particular action must be checked to determine if the action is visible. If false, then all actions will be non-visible and all the actions' visible methods will return false. The default value is true.

Returns:
A boolean to indicate whether actions on the TableView will be visible

getRulesContext

public com.sas.rpf.Context getRulesContext()
Gets the Context used by the Rules Processing framework for conditional formatting of cells.

Returns:
Returns the rulesContext.

setRulesContext

public void setRulesContext(com.sas.rpf.Context rulesContext)
Sets the Context used by the Rules Processing framework for conditional formatting of cells.

Parameters:
rulesContext - The rulesContext to set.

isColumnsResizable

public boolean isColumnsResizable()
Determines whether resizing of columns is supported.

Returns:
true if column resizing is supported

setColumnsResizable

public void setColumnsResizable(boolean columnsResizable)
Sets whether resizing of columns is supported.

Parameters:
columnsResizable - true if column resizing is supported

getTextWrapping

public int getTextWrapping()
Get locations where text wrapping is on

Returns:
An int specifying locations where text wrapping is on, possible values are WRAP_NONE and WRAP_ALL

setTextWrapping

public void setTextWrapping(int textWrapping)
Set locations where text wrapping is on

Parameters:
textWrapping - An int specifying locations where text wrapping is on, possible values are WRAP_NONE and WRAP_ALL

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:

Specified by:
writeContent in class com.sas.servlet.tbeans.BaseActionTransformation2
Throws:
java.io.IOException
See Also:
BaseActionTransformation2.write(PrintWriter)

writeTableTFoot

protected void writeTableTFoot(java.io.PrintWriter out)
                        throws java.io.IOException
Throws:
java.io.IOException

addFeature

public void addFeature(com.sas.servlet.tbeans.features.Feature feature)
Deprecated. Use getFeatures().add(feature) instead.

Add a feature to the TableView. These features will be written after the TableView. Features would include things like AJAXTableController, DnD, RowSelection

Parameters:
feature - a Feature to add

writeFeatures

protected void writeFeatures(javax.servlet.http.HttpServletRequest request,
                             java.io.PrintWriter out)
                      throws java.io.IOException
Write all the features in the feature list.

Parameters:
request -
out -
Throws:
java.io.IOException

addMoveMenu

protected void addMoveMenu(TableCellRenderer renderer,
                           ActionList actions)

removeLastBorder

protected StyleInfo removeLastBorder(TableCellRenderer renderer,
                                     int col,
                                     int row,
                                     StyleInfo savedStyle)
Add style information to remove the right/bottom border if on the last column/row. The table border will be used.




Copyright © 2009 SAS Institute Inc. All Rights Reserved.