org.apache.tapestry.contrib.table.model.simple
Class SimpleTableColumn

java.lang.Object
  |
  +--org.apache.tapestry.contrib.table.model.common.AbstractTableColumn
        |
        +--org.apache.tapestry.contrib.table.model.simple.SimpleTableColumn
All Implemented Interfaces:
ITableColumn, Serializable
Direct Known Subclasses:
ExpressionTableColumn, SqlTableColumn

public class SimpleTableColumn
extends AbstractTableColumn

A simple minimal implementation of the ITableColumn interface that provides all the basic services for displaying a column.

Version:
$Id: SimpleTableColumn.java,v 1.3 2003/09/06 14:04:42 mindbridge Exp $
Author:
mindbridge
See Also:
Serialized Form

Inner Class Summary
 class SimpleTableColumn.DefaultTableComparator
           
 
Constructor Summary
SimpleTableColumn(String strColumnName)
          Creates a SimpleTableColumn
SimpleTableColumn(String strColumnName, boolean bSortable)
          Creates a SimpleTableColumn
SimpleTableColumn(String strColumnName, ITableColumnEvaluator objEvaluator, boolean bSortable)
          Creates a SimpleTableColumn
SimpleTableColumn(String strColumnName, String strDisplayName)
          Creates a SimpleTableColumn
SimpleTableColumn(String strColumnName, String strDisplayName, boolean bSortable)
          Creates a SimpleTableColumn
SimpleTableColumn(String strColumnName, String strDisplayName, ITableColumnEvaluator objEvaluator, boolean bSortable)
          Creates a SimpleTableColumn
 
Method Summary
 Object getColumnValue(Object objRow)
          Extracts the value of the column from the row object
 String getDisplayName()
          Returns the display name of the column that will be used in the table header.
 ITableColumnEvaluator getEvaluator()
          Returns the evaluator.
 void setDisplayName(String displayName)
          Sets the displayName.
 void setEvaluator(ITableColumnEvaluator evaluator)
          Sets the evaluator.
 
Methods inherited from class org.apache.tapestry.contrib.table.model.common.AbstractTableColumn
getColumnName, getColumnRenderer, getColumnRendererSource, getComparator, getSortable, getValueRenderer, getValueRendererSource, setColumnName, setColumnRendererSource, setComparator, setSortable, setValueRendererSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleTableColumn

public SimpleTableColumn(String strColumnName)
Creates a SimpleTableColumn
Parameters:
strColumnName - the identifying name and display name of the column

SimpleTableColumn

public SimpleTableColumn(String strColumnName,
                         boolean bSortable)
Creates a SimpleTableColumn
Parameters:
strColumnName - the identifying name and display name of the column
bSortable - whether the column is sortable

SimpleTableColumn

public SimpleTableColumn(String strColumnName,
                         ITableColumnEvaluator objEvaluator,
                         boolean bSortable)
Creates a SimpleTableColumn
Parameters:
strColumnName - the identifying name and display name of the column
bSortable - whether the column is sortable
objEvaluator - the evaluator to extract the column value from the row

SimpleTableColumn

public SimpleTableColumn(String strColumnName,
                         String strDisplayName)
Creates a SimpleTableColumn
Parameters:
strColumnName - the identifying name of the column
strDisplayName - the display name of the column

SimpleTableColumn

public SimpleTableColumn(String strColumnName,
                         String strDisplayName,
                         boolean bSortable)
Creates a SimpleTableColumn
Parameters:
strColumnName - the identifying name of the column
strDisplayName - the display name of the column
bSortable - whether the column is sortable

SimpleTableColumn

public SimpleTableColumn(String strColumnName,
                         String strDisplayName,
                         ITableColumnEvaluator objEvaluator,
                         boolean bSortable)
Creates a SimpleTableColumn
Parameters:
strColumnName - the identifying name of the column
strDisplayName - the display name of the column
bSortable - whether the column is sortable
objEvaluator - the evaluator to extract the column value from the row
Method Detail

getDisplayName

public String getDisplayName()
Returns the display name of the column that will be used in the table header. Override for internationalization.
Returns:
String the display name of the column

setDisplayName

public void setDisplayName(String displayName)
Sets the displayName.
Parameters:
displayName - The displayName to set

getEvaluator

public ITableColumnEvaluator getEvaluator()
Returns the evaluator.
Returns:
ITableColumnEvaluator

setEvaluator

public void setEvaluator(ITableColumnEvaluator evaluator)
Sets the evaluator.
Parameters:
evaluator - The evaluator to set

getColumnValue

public Object getColumnValue(Object objRow)
Extracts the value of the column from the row object
Parameters:
objRow - the row object
Returns:
Object the column value