com.jgoodies.uifextras.printing
Class HTMLTableWriter

java.lang.Object
  extended by com.jgoodies.uifextras.printing.HTMLTableWriter

public class HTMLTableWriter
extends Object

Renders a TableModel as HTML. You can specify the column alignments.

Version:
$Revision: 1.4 $
Author:
Karsten Lentzsch

Constructor Summary
HTMLTableWriter()
          Constructs a HTMLTableWriter.
 
Method Summary
 boolean checkError()
          Flushes the stream and checks its error state.
 int getColumnAlignment(int col)
          Returns the aligment of the column with the given column index.
protected  void print(String str)
           
protected  void println(String str)
           
 void setColumnAlignments(int[] alignments)
          Sets the aligment of the column with the given column index.
protected  void writeFontEndTag()
           
protected  void writeFontStartTag()
           
 void writePage(Writer newOut, TableModel newModel)
          Writes the page to the specified Writer using the given table model.
 void writeTable(Writer newOut, TableModel newModel)
          Writes the table to the specified Writer using the given table model.
 void writeTableCellHTML(Object value, int column)
          Writes a table cell.
 void writeTableHeaderCellHTML(Object value)
          Writes a table header cell.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLTableWriter

public HTMLTableWriter()
Constructs a HTMLTableWriter.

Method Detail

getColumnAlignment

public int getColumnAlignment(int col)
Returns the aligment of the column with the given column index.


setColumnAlignments

public void setColumnAlignments(int[] alignments)
Sets the aligment of the column with the given column index.


checkError

public boolean checkError()
Flushes the stream and checks its error state. Errors are cumulative; once the stream encounters an error, this routine will return true on all successive calls.

Returns:
True if the print stream has encountered an error, either on the underlying output stream or during a format conversion.

print

protected void print(String str)

println

protected void println(String str)

writeFontEndTag

protected void writeFontEndTag()

writeFontStartTag

protected void writeFontStartTag()

writePage

public void writePage(Writer newOut,
                      TableModel newModel)
Writes the page to the specified Writer using the given table model.


writeTable

public void writeTable(Writer newOut,
                       TableModel newModel)
Writes the table to the specified Writer using the given table model.


writeTableCellHTML

public void writeTableCellHTML(Object value,
                               int column)
Writes a table cell.


writeTableHeaderCellHTML

public void writeTableHeaderCellHTML(Object value)
Writes a table header cell.



Copyright © 2000-2008 JGoodies Karsten Lentzsch. All Rights Reserved.