org.salespointframework.web.html
Class AbstractExtraColumn<T extends SpItem>

java.lang.Object
  extended by org.salespointframework.web.html.AbstractExtraColumn<T>

public abstract class AbstractExtraColumn<T extends SpItem>
extends java.lang.Object

This class could be used to render a extra column to a View in HTML representation.

Author:
Lars Kreisz, Uwe Schmidt

Field Summary
private  java.lang.String styleClass
          Style-class of the cells.
private  java.lang.String title
          Title of the extra column.
 
Constructor Summary
AbstractExtraColumn(java.lang.String title, java.lang.String styleClass)
          Adds an extra column to a table.
 
Method Summary
abstract  java.lang.String getCellContent(T identifier)
          Abstract Method to creating special cell-content by the extra column.
 java.lang.String getHeaderCell()
          Creating the html representation of the header-cell.
 java.lang.String getStyleClass()
          Gives the Style-class of the cells.
 boolean hasStyleClass()
          Gives the state by the Style-class of the cells.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

title

private java.lang.String title
Title of the extra column.


styleClass

private java.lang.String styleClass
Style-class of the cells.

Constructor Detail

AbstractExtraColumn

public AbstractExtraColumn(java.lang.String title,
                           java.lang.String styleClass)
Adds an extra column to a table.

Parameters:
title - Takes a title to header row.
styleClass - Takes the content to the column cells.
pivotColumn - Number of the pivot-column. It gives the content by the pivot-cell as 'identifier' to create the cell-content.
Method Detail

getStyleClass

public java.lang.String getStyleClass()
Gives the Style-class of the cells.

Returns:
String containing the Style-class-name.

hasStyleClass

public boolean hasStyleClass()
Gives the state by the Style-class of the cells.

Returns:
'True' if a Style-class is set.

getHeaderCell

public java.lang.String getHeaderCell()
Creating the html representation of the header-cell.

Returns:
a String containing a html representation of the header-cell.

getCellContent

public abstract java.lang.String getCellContent(T identifier)
Abstract Method to creating special cell-content by the extra column.

Parameters:
identifier - It is given by the table render-class. It contains the object by the pivot-cell.
Returns:
a String containing a html representation of the cell-content.