com.sas.servlet.tbeans.tableview.hdml
Class DefaultTableCellRenderer

com.sas.servlet.tbeans.tableview.hdml.DefaultTableCellRenderer
All Implemented Interfaces:
TableCell, TableCellRenderer
Direct Known Subclasses:
DefaultTableHeaderRenderer, DefaultTableRowHeaderRenderer

public class DefaultTableCellRenderer
implements TableCellRenderer

The DefaultTableCellRenderer is the default class for rendering a cell for a TableView. The table cell renderer creates the HDML tags that represent a table cell and the cell's contents(or body).

See Also:
TableView

Constructor Summary
DefaultTableCellRenderer()
          Constructs a new DefaultTableCellRenderer
 
Method Summary
 java.util.Locale getLocale()
          Gets the locale.
 TableCellContentsRenderer getTableCellContentsRenderer()
          Gets the cell contents renderer used to display the cell's contents.
 boolean isHeader()
          Return true if the cell is a header cell.
 void setHeader(boolean headerCell)
          Set whether the cell is a header cell.
 void setLocale(java.util.Locale loc)
          Sets the locale.
 void setTableCellContentsRenderer(TableCellContentsRenderer contentsRenderer)
          Sets the cell contents renderer used to display the cell's contents.
 void write(java.io.PrintWriter out, AbstractBaseTableView tableview, java.lang.Object value, java.lang.String name, ActionList actions)
          Write the entire table cell in the appropriate markup language.
 void writeBeginCell(java.io.PrintWriter out)
          Writes the begin tag for the table cell in the appropriate markup language.
 void writeEndCell(java.io.PrintWriter out)
          Writes the end tag for the table cell in the appropriate markup language.
 

Constructor Detail

DefaultTableCellRenderer

public DefaultTableCellRenderer()
Constructs a new DefaultTableCellRenderer

Method Detail

setTableCellContentsRenderer

public void setTableCellContentsRenderer(TableCellContentsRenderer contentsRenderer)
Sets the cell contents renderer used to display the cell's contents.

Specified by:
setTableCellContentsRenderer in interface TableCellRenderer
Parameters:
contentsRenderer - the renderer used to display the cell's contents.

getTableCellContentsRenderer

public TableCellContentsRenderer getTableCellContentsRenderer()
Gets the cell contents renderer used to display the cell's contents.

Specified by:
getTableCellContentsRenderer in interface TableCellRenderer
Returns:
the renderer used to display the cell's contents.

write

public void write(java.io.PrintWriter out,
                  AbstractBaseTableView tableview,
                  java.lang.Object value,
                  java.lang.String name,
                  ActionList actions)
           throws java.io.IOException
Write the entire table cell in the appropriate markup language. This method calls the writeBeginCell, writeEndCell and TableCellContentsRenderer.setCellRendererContentsValue methods.

Specified by:
write in interface TableCell
Parameters:
out - the output stream
tableview - the instance of the tableview being written.
value - the value to display as the cell's contents
name - the name to use for the contents component
actions - an actionlist of all the valid actions for this cell
Throws:
java.io.IOException - Thrown if some type of I/O error occurs

writeBeginCell

public void writeBeginCell(java.io.PrintWriter out)
                    throws java.io.IOException
Writes the begin tag for the table cell in the appropriate markup language.

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

writeEndCell

public void writeEndCell(java.io.PrintWriter out)
                  throws java.io.IOException
Writes the end tag for the table cell in the appropriate markup language.

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

isHeader

public boolean isHeader()
Return true if the cell is a header cell.

Specified by:
isHeader in interface TableCell
Returns:
true if the cell is a header cell

setHeader

public void setHeader(boolean headerCell)
Set whether the cell is a header cell.

Specified by:
setHeader in interface TableCell
Parameters:
headerCell - true if the cell is a header cell

setLocale

public void setLocale(java.util.Locale loc)
Sets the locale.

Specified by:
setLocale in interface TableCellRenderer
Parameters:
loc - an instance of java.util.Locale

getLocale

public java.util.Locale getLocale()
Gets the locale.

Specified by:
getLocale in interface TableCellRenderer
Returns:
an instance of java.util.Locale



Copyright © 2009 SAS Institute Inc. All Rights Reserved.