org.displaytag.render
Class TableWriterAdapter

java.lang.Object
  extended by org.displaytag.render.TableWriterTemplate
      extended by org.displaytag.render.TableWriterAdapter
Direct Known Subclasses:
HtmlTableWriter, ItextTableWriter

public abstract class TableWriterAdapter
extends TableWriterTemplate

Convenience abstract adapter for constructing a table view; contains only stub implementations. This class exists as a convenience for creating table-writer objects. Extend this class to create a table writer and override the methods of interest. This class also protects subclasses from future additions to TableWriterTemplate they may not be interested in.

Version:
$Id$
Author:
Jorge L. Barroso

Field Summary
 
Fields inherited from class org.displaytag.render.TableWriterTemplate
GROUP_END, GROUP_NO_CHANGE, GROUP_START, GROUP_START_AND_END, NO_RESET_GROUP
 
Constructor Summary
TableWriterAdapter()
           
 
Method Summary
protected  void writeBottomBanner(TableModel model)
          Called by writeTable to write the table's footer.
protected  void writeCaption(TableModel model)
          Called by writeTable to write the table's caption.
protected  void writeColumnCloser(Column column)
          Called by writeTableBody to write the end of the column structure.
protected  void writeColumnOpener(Column column)
          Called by writeTableBody to write the start of the column structure.
protected  void writeColumnValue(java.lang.Object value, Column column)
          Called by writeTableBody to write a column's value.
protected  void writeDecoratedRowFinish(TableModel model)
          Called by writeTableBody to decorate the table.
protected  void writeDecoratedRowStart(TableModel model)
          Called by writeTableBody to write to decorate the table.
protected  void writeDecoratedTableFinish(TableModel model)
          Called by writeTable to decorate the table.
protected  void writeEmptyListMessage(java.lang.String emptyListMessage)
          Called by writeTable to write a message explaining that the table model contains no data.
protected  void writeEmptyListRowMessage(java.lang.String message)
          Called by writeTableBody to write a message explaining that the row contains no data.
protected  void writePostBodyFooter(TableModel model)
          Called by writeTable to write table footer after table body.
protected  void writePreBodyFooter(TableModel model)
          Called by writeTable to write table footer before table body.
protected  void writeRowCloser(Row row)
          Called by writeTableBody to write the end of the row structure.
protected  void writeRowOpener(Row row)
          Called by writeTableBody to write the start of the row structure.
protected  void writeRowWithNoColumns(java.lang.String string)
          Called by writeTableBody to write a row that has no columns.
protected  void writeTableBodyCloser(TableModel model)
          Called by writeTable to write the end of the table's body.
protected  void writeTableBodyOpener(TableModel model)
          Called by writeTable to write the start of the table's body.
protected  void writeTableCloser(TableModel model)
          Called by writeTable to write the end of the table's structure.
protected  void writeTableHeader(TableModel model)
          Called by writeTable to write the table's header columns.
protected  void writeTableOpener(TableModel model)
          Called by writeTable to write the start of the table structure.
protected  void writeTopBanner(TableModel model)
          Called by writeTable to write a summary of the search result this table reports and the table's pagination interface.
 
Methods inherited from class org.displaytag.render.TableWriterTemplate
groupColumns, writeTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableWriterAdapter

public TableWriterAdapter()
Method Detail

writeEmptyListMessage

protected void writeEmptyListMessage(java.lang.String emptyListMessage)
                              throws java.lang.Exception
Description copied from class: TableWriterTemplate
Called by writeTable to write a message explaining that the table model contains no data.

Specified by:
writeEmptyListMessage in class TableWriterTemplate
Parameters:
emptyListMessage - A message explaining that the table model contains no data.
Throws:
java.lang.Exception - if it encounters an error while writing.
See Also:
TableWriterTemplate.writeEmptyListMessage(java.lang.String)

writeTopBanner

protected void writeTopBanner(TableModel model)
                       throws java.lang.Exception
Description copied from class: TableWriterTemplate
Called by writeTable to write a summary of the search result this table reports and the table's pagination interface.

Specified by:
writeTopBanner in class TableWriterTemplate
Parameters:
model - The table model for which the banner is written.
Throws:
java.lang.Exception - if it encounters an error while writing.
See Also:
TableWriterTemplate.writeTopBanner(org.displaytag.model.TableModel)

writeTableOpener

protected void writeTableOpener(TableModel model)
                         throws java.lang.Exception
Description copied from class: TableWriterTemplate
Called by writeTable to write the start of the table structure.

Specified by:
writeTableOpener in class TableWriterTemplate
Parameters:
model - The table model for which the content is written.
Throws:
java.lang.Exception - if it encounters an error while writing.
See Also:
TableWriterTemplate.writeTableOpener(org.displaytag.model.TableModel)

writeCaption

protected void writeCaption(TableModel model)
                     throws java.lang.Exception
Description copied from class: TableWriterTemplate
Called by writeTable to write the table's caption.

Specified by:
writeCaption in class TableWriterTemplate
Parameters:
model - The table model for which the content is written.
Throws:
java.lang.Exception - if it encounters an error while writing.
See Also:
TableWriterTemplate.writeCaption(org.displaytag.model.TableModel)

writeTableHeader

protected void writeTableHeader(TableModel model)
                         throws java.lang.Exception
Description copied from class: TableWriterTemplate
Called by writeTable to write the table's header columns.

Specified by:
writeTableHeader in class TableWriterTemplate
Parameters:
model - The table model for which the content is written.
Throws:
java.lang.Exception - if it encounters an error while writing.
See Also:
TableWriterTemplate.writeTableHeader(org.displaytag.model.TableModel)

writePreBodyFooter

protected void writePreBodyFooter(TableModel model)
                           throws java.lang.Exception
Description copied from class: TableWriterTemplate
Called by writeTable to write table footer before table body.

Specified by:
writePreBodyFooter in class TableWriterTemplate
Parameters:
model - The table model for which the content is written.
Throws:
java.lang.Exception - if it encounters an error while writing.
See Also:
TableWriterTemplate.writePreBodyFooter(org.displaytag.model.TableModel)

writeTableBodyOpener

protected void writeTableBodyOpener(TableModel model)
                             throws java.lang.Exception
Description copied from class: TableWriterTemplate
Called by writeTable to write the start of the table's body.

Specified by:
writeTableBodyOpener in class TableWriterTemplate
Parameters:
model - The table model for which the content is written.
Throws:
java.lang.Exception - if it encounters an error while writing.
See Also:
TableWriterTemplate.writeTableBodyOpener(org.displaytag.model.TableModel)

writeTableBodyCloser

protected void writeTableBodyCloser(TableModel model)
                             throws java.lang.Exception
Description copied from class: TableWriterTemplate
Called by writeTable to write the end of the table's body.

Specified by:
writeTableBodyCloser in class TableWriterTemplate
Parameters:
model - The table model for which the content is written.
Throws:
java.lang.Exception - if it encounters an error while writing.
See Also:
TableWriterTemplate.writeTableBodyCloser(org.displaytag.model.TableModel)

writePostBodyFooter

protected void writePostBodyFooter(TableModel model)
                            throws java.lang.Exception
Description copied from class: TableWriterTemplate
Called by writeTable to write table footer after table body.

Specified by:
writePostBodyFooter in class TableWriterTemplate
Parameters:
model - The table model for which the content is written.
Throws:
java.lang.Exception - if it encounters an error while writing.
See Also:
TableWriterTemplate.writePostBodyFooter(org.displaytag.model.TableModel)

writeTableCloser

protected void writeTableCloser(TableModel model)
                         throws java.lang.Exception
Description copied from class: TableWriterTemplate
Called by writeTable to write the end of the table's structure.

Specified by:
writeTableCloser in class TableWriterTemplate
Parameters:
model - The table model for which the content is written.
Throws:
java.lang.Exception - if it encounters an error while writing.
See Also:
TableWriterTemplate.writeTableCloser(org.displaytag.model.TableModel)

writeBottomBanner

protected void writeBottomBanner(TableModel model)
                          throws java.lang.Exception
Description copied from class: TableWriterTemplate
Called by writeTable to write the table's footer.

Specified by:
writeBottomBanner in class TableWriterTemplate
Parameters:
model - The table model for which the content is written.
Throws:
java.lang.Exception - if it encounters an error while writing.
See Also:
TableWriterTemplate.writeBottomBanner(org.displaytag.model.TableModel)

writeDecoratedTableFinish

protected void writeDecoratedTableFinish(TableModel model)
                                  throws java.lang.Exception
Description copied from class: TableWriterTemplate
Called by writeTable to decorate the table.

Specified by:
writeDecoratedTableFinish in class TableWriterTemplate
Parameters:
model - The table model for which the content is written.
Throws:
java.lang.Exception - if it encounters an error while writing.
See Also:
TableWriterTemplate.writeDecoratedTableFinish(org.displaytag.model.TableModel)

writeDecoratedRowStart

protected void writeDecoratedRowStart(TableModel model)
                               throws java.lang.Exception
Description copied from class: TableWriterTemplate
Called by writeTableBody to write to decorate the table.

Specified by:
writeDecoratedRowStart in class TableWriterTemplate
Parameters:
model - The table model for which the content is written.
Throws:
java.lang.Exception - if it encounters an error while writing.
See Also:
TableWriterTemplate.writeDecoratedRowStart(org.displaytag.model.TableModel)

writeRowOpener

protected void writeRowOpener(Row row)
                       throws java.lang.Exception
Description copied from class: TableWriterTemplate
Called by writeTableBody to write the start of the row structure.

Specified by:
writeRowOpener in class TableWriterTemplate
Parameters:
row - The table row for which the content is written.
Throws:
java.lang.Exception - if it encounters an error while writing.
See Also:
TableWriterTemplate.writeRowOpener(org.displaytag.model.Row)

writeColumnOpener

protected void writeColumnOpener(Column column)
                          throws java.lang.Exception
Description copied from class: TableWriterTemplate
Called by writeTableBody to write the start of the column structure.

Specified by:
writeColumnOpener in class TableWriterTemplate
Parameters:
column - The table column for which the content is written.
Throws:
java.lang.Exception - if it encounters an error while writing.
See Also:
TableWriterTemplate.writeColumnOpener(org.displaytag.model.Column)

writeColumnValue

protected void writeColumnValue(java.lang.Object value,
                                Column column)
                         throws java.lang.Exception
Description copied from class: TableWriterTemplate
Called by writeTableBody to write a column's value.

Specified by:
writeColumnValue in class TableWriterTemplate
Parameters:
value - The column value.
column - The table column for which the content is written.
Throws:
java.lang.Exception - if it encounters an error while writing.
See Also:
TableWriterTemplate.writeColumnValue(Object,org.displaytag.model.Column)

writeColumnCloser

protected void writeColumnCloser(Column column)
                          throws java.lang.Exception
Description copied from class: TableWriterTemplate
Called by writeTableBody to write the end of the column structure.

Specified by:
writeColumnCloser in class TableWriterTemplate
Parameters:
column - The table column for which the content is written.
Throws:
java.lang.Exception - if it encounters an error while writing.
See Also:
TableWriterTemplate.writeColumnCloser(org.displaytag.model.Column)

writeRowWithNoColumns

protected void writeRowWithNoColumns(java.lang.String string)
                              throws java.lang.Exception
Description copied from class: TableWriterTemplate
Called by writeTableBody to write a row that has no columns.

Specified by:
writeRowWithNoColumns in class TableWriterTemplate
Parameters:
string - The row value.
Throws:
java.lang.Exception - if it encounters an error while writing.
See Also:
TableWriterTemplate.writeRowWithNoColumns(java.lang.String)

writeRowCloser

protected void writeRowCloser(Row row)
                       throws java.lang.Exception
Description copied from class: TableWriterTemplate
Called by writeTableBody to write the end of the row structure.

Specified by:
writeRowCloser in class TableWriterTemplate
Parameters:
row - The table row for which the content is written.
Throws:
java.lang.Exception - if it encounters an error while writing.
See Also:
TableWriterTemplate.writeRowCloser(org.displaytag.model.Row)

writeDecoratedRowFinish

protected void writeDecoratedRowFinish(TableModel model)
                                throws java.lang.Exception
Description copied from class: TableWriterTemplate
Called by writeTableBody to decorate the table.

Specified by:
writeDecoratedRowFinish in class TableWriterTemplate
Parameters:
model - The table model for which the content is written.
Throws:
java.lang.Exception - if it encounters an error while writing.
See Also:
TableWriterTemplate.writeDecoratedRowFinish(org.displaytag.model.TableModel)

writeEmptyListRowMessage

protected void writeEmptyListRowMessage(java.lang.String message)
                                 throws java.lang.Exception
Description copied from class: TableWriterTemplate
Called by writeTableBody to write a message explaining that the row contains no data.

Specified by:
writeEmptyListRowMessage in class TableWriterTemplate
Parameters:
message - The message explaining that the row contains no data.
Throws:
java.lang.Exception - if it encounters an error while writing.
See Also:
TableWriterTemplate.writeEmptyListRowMessage(java.lang.String)


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