com.sas.servlet.tbeans.remotefileselector2
Class BaseFieldRenderer

com.sas.servlet.tbeans.remotefileselector2.BaseFieldRenderer
All Implemented Interfaces:
HttpConstants, StyleInterface, TableCell, TableCellRenderer, javax.swing.SwingConstants
Direct Known Subclasses:
ColumnAsRowCellRenderer

public abstract class BaseFieldRenderer

BaseFieldRenderer is the abstract base class for any renderers used to control the display of the description row of the RemoteFileSelector. The description row is the last column displayed in the file view area of the RemoteFileSelector. The specific class used for rendering the description row is the ColumnAsRowCellRenderer class. It displays this column as a row and it also controls whether the description is visible or not. By default, the description is available for each file and folder but it is hidden.

Renderers of this type should be used with the TableView transformation bean. The TableView class is used to construct an HTML table.


Field Summary
 
Fields inherited from interface com.sas.servlet.tbeans.HttpConstants
ALL, BASELINE, CHAR, COL, COLGROUP, JUSTIFY, MULTIPLE, NONE, ROW, ROWGROUP, SINGLE
 
Constructor Summary
BaseFieldRenderer()
          Constructs a new BaseFieldRenderer.
 
Method Summary
 java.lang.String getArrayName()
          Returns the name of the array used to store the table cells containing descriptions.
 java.lang.String getName()
          Returns name of the renderer.
 int getStartColumn()
          Returns the start column.
 boolean isFieldRenderable()
          Returns the status of the FieldRenderer which indicates whether anything is written out by the renderer.
 boolean isVisible()
          Returns the visibility status for the renderer.
 void setArrayName(java.lang.String name)
          Sets the name of the array used to store the table cells containing descriptions.
 void setFieldRenderable(boolean render)
          Sets a status on the renderer to indicate whether anything should be rendered for the description or for the field.
 void setName(java.lang.String name)
          Sets the name of the row renderer.
 void setStartColumn(int startIndex)
          Sets the column where rendering will start.
 void setVisible(boolean visibility)
          Sets the visibility attribute of the renderer.
 
Methods inherited from class com.sas.servlet.tbeans.tableview.html.DefaultTableCellRenderer
getTableCellContentsRenderer, setTableCellContentsRenderer, write
 
Methods inherited from class com.sas.servlet.tbeans.tableview.html.BaseTableCell
getBgColor, getColSpan, getCustomAttributes, getHeaders, getHeight, getHeightPercentage, getHorizontalAlignment, getId, getLocale, getRowSpan, getScope, getStyleInfo, getVerticalAlignment, getWidth, getWidthPercentage, isHeader, isNoWrap, setBgColor, setColSpan, setCustomAttributes, setHeader, setHeaders, setHeight, setHeightPercentage, setHorizontalAlignment, setId, setLocale, setNoWrap, setRowSpan, setScope, setStyleInfo, setVerticalAlignment, setWidth, setWidthPercentage, writeBeginCell, writeEndCell
 
Methods inherited from interface com.sas.servlet.tbeans.tableview.TableCellRenderer
getLocale, setLocale
 
Methods inherited from interface com.sas.servlet.tbeans.tableview.TableCell
isHeader, setHeader, writeBeginCell, writeEndCell
 

Constructor Detail

BaseFieldRenderer

public BaseFieldRenderer()
Constructs a new BaseFieldRenderer. Any renderer used for the description row should be an instance of this class. A default name is set for the renderer.

Method Detail

setName

public void setName(java.lang.String name)
Sets the name of the row renderer. The name provided replaces the default name or any previous name of the renderer.

Parameters:
name - row renderer name
See Also:
getName()

getName

public java.lang.String getName()
Returns name of the renderer.

Returns:
name row renderer name
See Also:
setName(String)

setVisible

public void setVisible(boolean visibility)
Sets the visibility attribute of the renderer. This is used to determine the display status of the column data or of the tag of an HTML table. If visibility is true then the display status of the <tr> tag is block, otherwise it is none. Therefore, the column data is displayed when the visibility is set to true and the column data is hidden when the visibility is set to false.

Parameters:
visibility - the visibility status of the description or the column data. If true, the description is displayed, otherwise the description is hidden.
See Also:
isVisible()

isVisible

public boolean isVisible()
Returns the visibility status for the renderer.

Returns:
false by default
See Also:
setVisible(boolean)

setFieldRenderable

public void setFieldRenderable(boolean render)
Sets a status on the renderer to indicate whether anything should be rendered for the description or for the field. This attribute can be used to prevent the generation of code. In the case where the ColumnAsRowCellRenderer is used, JavaScript is generated to save the descriptions in an array. To prevent the generation of this code set render to false. This will also prevent rendering of the description. Thus, nothing will be rendered for the column that uses this renderer if render is set to false.

Parameters:
render - true by default, the field data and JavaScript are rendered
See Also:
isFieldRenderable(), ColumnAsRowCellRenderer

isFieldRenderable

public boolean isFieldRenderable()
Returns the status of the FieldRenderer which indicates whether anything is written out by the renderer.

Returns:
true by default
See Also:
setFieldRenderable(boolean)

setArrayName

public void setArrayName(java.lang.String name)
Sets the name of the array used to store the table cells containing descriptions. The table cells are the <td> tag ids.

Parameters:
name - name of array containing <td> elements
See Also:
getArrayName()

getArrayName

public java.lang.String getArrayName()
Returns the name of the array used to store the table cells containing descriptions. Provides access to the fields <td>s. A default array name is provided. This name is used by the JavaScript of the RemoteFileSelector to set the display status of the <tr> tags or the parent tag of the given <td> id.

Returns:
name of array containing the <td> elements that contain descriptions
See Also:
setArrayName(String)

setStartColumn

public void setStartColumn(int startIndex)
Sets the column where rendering will start. By default the field will be rendered starting in the first column. If a value of 1 is specified then that is the same as the default behavior and rendering will begin in the first column. Any values less than 1 are ignored and rendering will begin in the first column.

Parameters:
startIndex - starting point for rendering the field data

getStartColumn

public int getStartColumn()
Returns the start column. This value indicates where the rows will start to render.

Returns:
start column for rendering
See Also:
setStartColumn(int)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.