org.displaytag.model
Class HeaderCell

java.lang.Object
  extended byorg.displaytag.model.HeaderCell

public class HeaderCell
extends java.lang.Object

DataObject representing the column header. The header cell contains all the properties common to cells in the same column.

Version:
$Revision: 1.16 $ ($Author: fgiust $)
Author:
Fabrizio Giustina

Constructor Summary
HeaderCell()
           
 
Method Summary
 void addHeaderClass(java.lang.String cssClass)
          Adds a css class to the html "class" attribute.
 boolean getAutoLink()
          is autolink enabled?
 java.lang.String getBeanPropertyName()
          Getter for the name of the property to look up in the bean.
 java.lang.String getCloseTag()
          return the closing tag for a cell (td).
 ColumnDecorator getColumnDecorator()
          Returns the columnDecorator object for this column.
 int getColumnNumber()
          Getter for the column number.
 int getGroup()
          getter for the grouping index.
 HtmlAttributeMap getHeaderAttributes()
          returns the HtmlAttributeMap containg all the html attributes for the th tag.
 java.lang.String getHeaderCloseTag()
          return the closing tag for a column header (th).
 java.lang.String getHeaderOpenTag()
          return the open tag for a column header (th).
 Href getHref()
          Getter for the href to be used for dinamic links in cells.
 HtmlAttributeMap getHtmlAttributes()
          Returns the HtmlAttributeMap containg all the html attributes for the td tags.
 int getMaxLength()
          getter for the max number of characters to display in the column.
 int getMaxWords()
          getter for the max number of words to display in the column.
 java.lang.String getOpenTag()
          return the open tag for a cell (td).
 java.lang.String getParamName()
          Getter for the name of the param to add to links.
 java.lang.String getParamProperty()
          Getter for the name of the property to look up in bean to get the param value for links.
 boolean getShowNulls()
          Should null be displayed?
 boolean getSortable()
          Is the column sortable?
 java.lang.String getSortProperty()
          Getter for the name of the property in the bean which will be used for sorting.
 java.lang.String getTitle()
          Gets the column title.
 boolean isAlreadySorted()
          Is the column already sorted?
 void setAlreadySorted()
          Setter for the sorted property (the column is actually sorted).
 void setAutoLink(boolean autoLinkEnabled)
          enable or disable autolink for the column.
 void setBeanPropertyName(java.lang.String propertyName)
          Setter for the name of the property to look up in the bean.
 void setColumnDecorator(ColumnDecorator decorator)
          Sets the columnDecorator object for this column.
 void setColumnNumber(int number)
          Setter for the column number.
 void setGroup(int groupingOrder)
          setter for the grouping index.
 void setHeaderAttributes(HtmlAttributeMap attributes)
          Sets the HtmlAttributeMap containg all the html attributes for the th tag.
 void setHref(Href baseHref)
          Setter for the href to be used for dinamic links in cells.
 void setHtmlAttributes(HtmlAttributeMap attributes)
          Sets the HtmlAttributeMap containg all the html attributes for the td tags.
 void setMaxLength(int numOfChars)
          setter for the max number of characters to display in the column.
 void setMaxWords(int numOfWords)
          setter for the max number of words to display in the column.
 void setParamName(java.lang.String name)
          Setter for the name of the param to add to links.
 void setParamProperty(java.lang.String property)
          Setter for the name of the property to look up in bean to get the param value for links.
 void setShowNulls(boolean outputNulls)
          Enable or disable displaying of null values.
 void setSortable(boolean isSortable)
          is the column sortable?
 void setSortProperty(java.lang.String propertyName)
          Setter for the name of the property in the bean which will be used for sorting.
 void setTitle(java.lang.String value)
          Setter for the column title.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HeaderCell

public HeaderCell()
Method Detail

getGroup

public int getGroup()
getter for the grouping index.

Returns:
0 if the column is not grouped or the grouping order

setGroup

public void setGroup(int groupingOrder)
setter for the grouping index.

Parameters:
groupingOrder - int grouping order (>0)

getAutoLink

public boolean getAutoLink()
is autolink enabled?

Returns:
true if autolink is enabled for the column

setAutoLink

public void setAutoLink(boolean autoLinkEnabled)
enable or disable autolink for the column.

Parameters:
autoLinkEnabled - boolean autolink enabled

getMaxLength

public int getMaxLength()
getter for the max number of characters to display in the column.

Returns:
int number of characters to display in the column

setMaxLength

public void setMaxLength(int numOfChars)
setter for the max number of characters to display in the column.

Parameters:
numOfChars - number of characters to display in the column

getMaxWords

public int getMaxWords()
getter for the max number of words to display in the column.

Returns:
int number of words to display in the column

setMaxWords

public void setMaxWords(int numOfWords)
setter for the max number of words to display in the column.

Parameters:
numOfWords - number of words to display in the column

getShowNulls

public boolean getShowNulls()
Should null be displayed?

Returns:
true null will be displayed in cell content

setShowNulls

public void setShowNulls(boolean outputNulls)
Enable or disable displaying of null values.

Parameters:
outputNulls - boolean true if null should be displayed

getBeanPropertyName

public java.lang.String getBeanPropertyName()
Getter for the name of the property to look up in the bean.

Returns:
String name of the property to look up in the bean

setBeanPropertyName

public void setBeanPropertyName(java.lang.String propertyName)
Setter for the name of the property to look up in the bean.

Parameters:
propertyName - - name of the property to look up in the bean

isAlreadySorted

public boolean isAlreadySorted()
Is the column already sorted?

Returns:
true if the column already sorted

setAlreadySorted

public void setAlreadySorted()
Setter for the sorted property (the column is actually sorted).


getColumnNumber

public int getColumnNumber()
Getter for the column number.

Returns:
int column number

setColumnNumber

public void setColumnNumber(int number)
Setter for the column number.

Parameters:
number - - int column number

getColumnDecorator

public ColumnDecorator getColumnDecorator()
Returns the columnDecorator object for this column.

Returns:
ColumnDecorator

setColumnDecorator

public void setColumnDecorator(ColumnDecorator decorator)
Sets the columnDecorator object for this column.

Parameters:
decorator - - the ColumnDecorator

getSortable

public boolean getSortable()
Is the column sortable?

Returns:
true if the column is sortable

setSortable

public void setSortable(boolean isSortable)
is the column sortable?

Parameters:
isSortable - - true if the column can be sorted

getTitle

public java.lang.String getTitle()
Gets the column title.

Returns:
the column title. If no title is specified the capitalized bean property name is returned

setTitle

public void setTitle(java.lang.String value)
Setter for the column title.

Parameters:
value - - the column title

getHtmlAttributes

public HtmlAttributeMap getHtmlAttributes()
Returns the HtmlAttributeMap containg all the html attributes for the td tags.

Returns:
HtmlAttributeMap with td attributes

setHtmlAttributes

public void setHtmlAttributes(HtmlAttributeMap attributes)
Sets the HtmlAttributeMap containg all the html attributes for the td tags.

Parameters:
attributes - HtmlAttributeMap

getHeaderAttributes

public HtmlAttributeMap getHeaderAttributes()
returns the HtmlAttributeMap containg all the html attributes for the th tag.

Returns:
HtmlAttributeMap with th attributes

setHeaderAttributes

public void setHeaderAttributes(HtmlAttributeMap attributes)
Sets the HtmlAttributeMap containg all the html attributes for the th tag.

Parameters:
attributes - HtmlAttributeMap

addHeaderClass

public void addHeaderClass(java.lang.String cssClass)
Adds a css class to the html "class" attribute.

Parameters:
cssClass - String

getOpenTag

public java.lang.String getOpenTag()
return the open tag for a cell (td).

Returns:
String <td> tag with attributes

getHeaderOpenTag

public java.lang.String getHeaderOpenTag()
return the open tag for a column header (th).

Returns:
String <th> tag with attributes

getCloseTag

public java.lang.String getCloseTag()
return the closing tag for a cell (td).

Returns:
String </td>

getHeaderCloseTag

public java.lang.String getHeaderCloseTag()
return the closing tag for a column header (th).

Returns:
String </th>

setHref

public void setHref(Href baseHref)
Setter for the href to be used for dinamic links in cells.

Parameters:
baseHref - base href for links

getHref

public Href getHref()
Getter for the href to be used for dinamic links in cells.

Returns:
Href base href for links

setParamName

public void setParamName(java.lang.String name)
Setter for the name of the param to add to links.

Parameters:
name - name of the param

getParamName

public java.lang.String getParamName()
Getter for the name of the param to add to links.

Returns:
String name of the param

setParamProperty

public void setParamProperty(java.lang.String property)
Setter for the name of the property to look up in bean to get the param value for links.

Parameters:
property - name of the property to look up in bean to get the param value for links

getParamProperty

public java.lang.String getParamProperty()
Getter for the name of the property to look up in bean to get the param value for links.

Returns:
String name of the property to look up in bean to get the param value for links

getSortProperty

public java.lang.String getSortProperty()
Getter for the name of the property in the bean which will be used for sorting.

Returns:
String name of the property in the bean which will be used for sorting

setSortProperty

public void setSortProperty(java.lang.String propertyName)
Setter for the name of the property in the bean which will be used for sorting.

Parameters:
propertyName - - name of the property in the bean which will be used for sorting

toString

public java.lang.String toString()
See Also:
Object.toString()


Copyright © 2002-2005 the Displaytag team. All Rights Reserved.