org.apache.wicket.extensions.markup.html.repeater.data.table
Class AbstractColumn

java.lang.Object
  extended by org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn
All Implemented Interfaces:
java.io.Serializable, ICellPopulator, IColumn, IStyledColumn, org.apache.wicket.IClusterable, org.apache.wicket.model.IDetachable
Direct Known Subclasses:
FilteredAbstractColumn, HeaderlessColumn, PropertyColumn

public abstract class AbstractColumn
extends java.lang.Object
implements IStyledColumn

A helper implementation for the IColumn interface

Author:
Igor Vaynberg ( ivaynberg )
See Also:
Serialized Form

Constructor Summary
AbstractColumn(org.apache.wicket.model.IModel displayModel)
           
AbstractColumn(org.apache.wicket.model.IModel displayModel, java.lang.String sortProperty)
           
 
Method Summary
 void detach()
           
 java.lang.String getCssClass()
          Returns the css class for this column.
 org.apache.wicket.model.IModel getDisplayModel()
           
 org.apache.wicket.Component getHeader(java.lang.String componentId)
          Returns the component that will be used as the header for the column.
 java.lang.String getSortProperty()
          Returns the name of the property that this header sorts.
 boolean isSortable()
          Returns true if this header should be a sortable header
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator
populateItem
 

Constructor Detail

AbstractColumn

public AbstractColumn(org.apache.wicket.model.IModel displayModel,
                      java.lang.String sortProperty)
Parameters:
displayModel - model used to generate header text
sortProperty - sort property this column represents

AbstractColumn

public AbstractColumn(org.apache.wicket.model.IModel displayModel)
Parameters:
displayModel - model used to generate header text
Method Detail

getDisplayModel

public org.apache.wicket.model.IModel getDisplayModel()
Returns:
returns display model to be used for the header component

getSortProperty

public java.lang.String getSortProperty()
Description copied from interface: IColumn
Returns the name of the property that this header sorts. If null is returned the header will be unsortable.

Specified by:
getSortProperty in interface IColumn
Returns:
a string representing the sort property
See Also:
IColumn.getSortProperty()

isSortable

public boolean isSortable()
Description copied from interface: IColumn
Returns true if this header should be a sortable header

Specified by:
isSortable in interface IColumn
Returns:
true if header should be sortable
See Also:
IColumn.isSortable()

getHeader

public org.apache.wicket.Component getHeader(java.lang.String componentId)
Description copied from interface: IColumn
Returns the component that will be used as the header for the column. This component will be contained in <span> tags.

Specified by:
getHeader in interface IColumn
Parameters:
componentId - component id for the returned Component
Returns:
component that will be used as the header for the column
See Also:
IColumn.getHeader(java.lang.String)

detach

public void detach()
Specified by:
detach in interface org.apache.wicket.model.IDetachable
See Also:
IDetachable.detach()

getCssClass

public java.lang.String getCssClass()
Description copied from interface: IStyledColumn
Returns the css class for this column.

Specified by:
getCssClass in interface IStyledColumn
Returns:
CSS class name


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.