org.displaytag.model
Class Column

java.lang.Object
  extended by org.displaytag.model.Column

public class Column
extends java.lang.Object

Represents a column in a table.

Version:
$Revision: 1092 $ ($Author: rapruitt $)
Author:
Fabrizio Giustina

Constructor Summary
Column(HeaderCell headerCell, Cell currentCell, Row parentRow)
          Constructor for Column.
 
Method Summary
 java.lang.String createChoppedAndLinkedValue()
          Calculates the cell content, cropping or linking the value as needed.
 java.lang.String getChoppedAndLinkedValue()
          get the final value to be displayed in the table.
 java.lang.String getCloseTag()
          Generates the cell close tag (</td>).
 HeaderCell getHeaderCell()
          Get the header cell for this column.
 java.lang.String getOpenTag()
          Generates the cell open tag.
 java.lang.Object getValue(boolean decorated)
          Gets the value, after calling the table / column decorator is requested.
 void initialize()
          Initialize the cell value.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Column

public Column(HeaderCell headerCell,
              Cell currentCell,
              Row parentRow)
Constructor for Column.

Parameters:
headerCell - HeaderCell
currentCell - Cell
parentRow - Row
Method Detail

getHeaderCell

public HeaderCell getHeaderCell()
Get the header cell for this column.

Returns:
the cell

getValue

public java.lang.Object getValue(boolean decorated)
                          throws ObjectLookupException,
                                 DecoratorException
Gets the value, after calling the table / column decorator is requested.

Parameters:
decorated - boolean
Returns:
Object will never be null if ShowNulls has been set to false
Throws:
ObjectLookupException - for errors in bean property lookup
DecoratorException - if a column decorator is used and an exception is thrown during value decoration

getOpenTag

public java.lang.String getOpenTag()
Generates the cell open tag.

Returns:
String td open tag

initialize

public void initialize()
                throws DecoratorException,
                       ObjectLookupException
Initialize the cell value.

Throws:
ObjectLookupException - for errors in bean property lookup
DecoratorException - if a column decorator is used and an exception is thrown during value decoration
DecoratorException
ObjectLookupException

getCloseTag

public java.lang.String getCloseTag()
Generates the cell close tag (</td>).

Returns:
String td closing tag

createChoppedAndLinkedValue

public java.lang.String createChoppedAndLinkedValue()
                                             throws ObjectLookupException,
                                                    DecoratorException
Calculates the cell content, cropping or linking the value as needed.

Returns:
String
Throws:
ObjectLookupException - for errors in bean property lookup
DecoratorException - if a column decorator is used and an exception is thrown during value decoration

getChoppedAndLinkedValue

public java.lang.String getChoppedAndLinkedValue()
get the final value to be displayed in the table. This method can only be called after initialize(), where the content is evaluated

Returns:
String final value to be displayed in the table

toString

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


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