org.apache.tapestry.contrib.table.components
Class TableColumns

java.lang.Object
  |
  +--org.apache.tapestry.spec.BaseLocatable
        |
        +--org.apache.tapestry.AbstractComponent
              |
              +--org.apache.tapestry.BaseComponent
                    |
                    +--org.apache.tapestry.contrib.table.components.AbstractTableViewComponent
                          |
                          +--org.apache.tapestry.contrib.table.components.TableColumns
All Implemented Interfaces:
IComponent, ILocatable, ILocationHolder, IRender

public abstract class TableColumns
extends AbstractTableViewComponent

A low level Table component that renders the column headers in the table. This component must be wrapped by TableView.

The component iterates over all column objects in the ITableColumnModel and renders a header for each one of them using the renderer provided by the getColumnRender() method in ITableColumn. The headers are wrapped in 'th' tags by default.

Please see the Component Reference for details on how to use this component. [Component Reference]

Version:
$Id: TableColumns.java,v 1.6 2004/01/24 15:41:30 mindbridge Exp $
Author:
mindbridge

Field Summary
static String TABLE_COLUMN_ARROW_DOWN_ATTRIBUTE
           
static String TABLE_COLUMN_ARROW_UP_ATTRIBUTE
           
 
Constructor Summary
TableColumns()
           
 
Method Summary
abstract  IAsset getArrowDownAsset()
           
abstract  IAsset getArrowUpAsset()
           
abstract  IBinding getColumnBinding()
           
 ITableColumn getTableColumn()
          Returns the currently rendered table column.
 Iterator getTableColumnIterator()
          Get the list of all table columns to be displayed.
 IRender getTableColumnRenderer()
          Returns the renderer to be used to generate the header of the current column
protected  void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
          Renders the top level components contained by the receiver.
 void setTableColumn(ITableColumn tableColumn)
          Sets the currently rendered table column.
 
Methods inherited from class org.apache.tapestry.contrib.table.components.AbstractTableViewComponent
getTableModelSource
 
Methods inherited from class org.apache.tapestry.BaseComponent
addOuter, finishLoad
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, cleanupAfterRender, finishLoad, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, format, format, format, format, formatString, formatString, formatString, formatString, generateAttributes, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getChangeObserver, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, getString, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setContainer, setId, setNamespace, setPage, setProperty, setSpecification, toString
 
Methods inherited from class org.apache.tapestry.spec.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.ILocationHolder
setLocation
 
Methods inherited from interface org.apache.tapestry.ILocatable
getLocation
 

Field Detail

TABLE_COLUMN_ARROW_UP_ATTRIBUTE

public static final String TABLE_COLUMN_ARROW_UP_ATTRIBUTE
See Also:
Constant Field Values

TABLE_COLUMN_ARROW_DOWN_ATTRIBUTE

public static final String TABLE_COLUMN_ARROW_DOWN_ATTRIBUTE
See Also:
Constant Field Values
Constructor Detail

TableColumns

public TableColumns()
Method Detail

getColumnBinding

public abstract IBinding getColumnBinding()

getArrowDownAsset

public abstract IAsset getArrowDownAsset()

getArrowUpAsset

public abstract IAsset getArrowUpAsset()

getTableColumn

public ITableColumn getTableColumn()
Returns the currently rendered table column. You can call this method to obtain the current column.

Returns:
ITableColumn the current table column

setTableColumn

public void setTableColumn(ITableColumn tableColumn)
Sets the currently rendered table column. This method is for internal use only.

Parameters:
tableColumn - The current table column

getTableColumnIterator

public Iterator getTableColumnIterator()
Get the list of all table columns to be displayed.

Returns:
an iterator of all table columns

getTableColumnRenderer

public IRender getTableColumnRenderer()
Returns the renderer to be used to generate the header of the current column

Returns:
the header renderer of the current column

renderComponent

protected void renderComponent(IMarkupWriter writer,
                               IRequestCycle cycle)
Description copied from class: BaseComponent
Renders the top level components contained by the receiver.

Overrides:
renderComponent in class BaseComponent
See Also:
BaseComponent.renderComponent(IMarkupWriter, IRequestCycle)