com.jrefinery.report.targets.table.html
Class HtmlTextCellData

java.lang.Object
  |
  +--com.jrefinery.report.targets.table.TableCellData
        |
        +--com.jrefinery.report.targets.table.html.HtmlCellData
              |
              +--com.jrefinery.report.targets.table.html.HtmlTextCellData

public class HtmlTextCellData
extends HtmlCellData

A wrapper for text content within the generated HtmlTable.

Author:
Thomas Morgner

Constructor Summary
HtmlTextCellData(java.awt.geom.Rectangle2D outerBounds, java.lang.String value, HtmlCellStyle style, boolean useXHTML)
          Creates a new HtmlTextCellData for the given content.
 
Method Summary
 boolean isBackground()
          Gets a flag, which indicates whether this cell contains background definitions.
static void printText(java.io.PrintWriter pout, java.lang.String text, boolean useXHTML)
          Generates the HTML output for printing the given text.
 void write(java.io.PrintWriter pout, HtmlFilesystem filesystem)
          Writes the (X)HTML-Code to print the Text-Content.
 
Methods inherited from class com.jrefinery.report.targets.table.html.HtmlCellData
getStyle, isUseXHTML
 
Methods inherited from class com.jrefinery.report.targets.table.TableCellData
getBounds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlTextCellData

public HtmlTextCellData(java.awt.geom.Rectangle2D outerBounds,
                        java.lang.String value,
                        HtmlCellStyle style,
                        boolean useXHTML)
Creates a new HtmlTextCellData for the given content.

Parameters:
outerBounds - the cell bounds.
value - the text content.
style - the style definition for the cell.
useXHTML - a flag indicating whether to use XHTML.
Method Detail

write

public void write(java.io.PrintWriter pout,
                  HtmlFilesystem filesystem)
Writes the (X)HTML-Code to print the Text-Content.

Specified by:
write in class HtmlCellData
Parameters:
pout - the print writer, which receives the generated HTML-Code.
filesystem - not used.

isBackground

public boolean isBackground()
Gets a flag, which indicates whether this cell contains background definitions.

Specified by:
isBackground in class TableCellData
Returns:
false, as this is no background cell.

printText

public static void printText(java.io.PrintWriter pout,
                             java.lang.String text,
                             boolean useXHTML)
Generates the HTML output for printing the given text.

Parameters:
pout - the target writer
text - the text that should be printed.
useXHTML - true, if XHTML is generated, false otherwise.