public class HtmlFile extends MarkupFile
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
HTML_FILE_EXTENSION |
fileExtension, fileName, generator, mode, MODE_HTML, MODE_XML_XSL, title
Constructor and Description |
---|
HtmlFile(java.lang.String fileName,
java.lang.String title,
java.lang.String generator)
Constructs a new text file for HTML output
|
HtmlFile(java.lang.String fileName,
java.lang.String title,
java.lang.String generator,
StandardHtmlSettings settings)
Constructs a new text file for HTML output
|
HtmlFile(java.io.Writer writer,
java.lang.String fileName,
java.lang.String title,
java.lang.String generator)
Constructs a new text file or output stream for HTML output
|
HtmlFile(java.io.Writer writer,
java.lang.String fileName,
java.lang.String title,
java.lang.String generator,
StandardHtmlSettings settings)
Constructs a new text file or output stream for HTML output
|
Modifier and Type | Method and Description |
---|---|
void |
beginRow() |
void |
beginTable() |
void |
endRow() |
void |
endTable() |
protected java.lang.String |
getConvertedString(char charToConvert)
Returns the HTML compliant char, e.g.
|
protected java.lang.String |
getConvertedStringForContent(java.lang.String content)
Returns the converted string for content like e.g. database field value.
|
void |
outputFooter()
Outputs the file's footer.
|
void |
outputHeader()
Outputs the file's header.
|
void |
outputHeader(boolean printOnLoad)
Outputs the file's header.
|
void |
outputHeader(boolean printOnLoad,
java.lang.String[] additionalLines) |
void |
outputHeader(java.lang.String[] additionalLines) |
protected void |
outputItem(DataObject dataObjectToList,
java.lang.String[] columns)
Outputs the specified columns of the current row of the data object to list
|
void |
outTD(int cellValue) |
void |
outTD(java.lang.String cellValue) |
void |
outTD(java.lang.String cellValue,
int colspan) |
void |
outTDb(java.lang.String cellValue) |
void |
outTDForContent(java.lang.String cellValue)
Outputs a cell value after basically converting it, e.g. '<' is replace by '<';
|
void |
outTDr(int cellValue) |
void |
outTDr(java.lang.String cellValue) |
void |
outTDrb(java.lang.String cellValue) |
void |
pageBreak() |
void |
println(java.lang.String line)
Writes a new line into the HTML file which is ending by "
". |
void |
printlnNonConverted(java.lang.String line) |
void |
writeTableHeader(java.lang.String[] columnNames)
Writes column names as header (bold).
|
void |
writeTableRow(java.lang.String[] columnValues)
Writes column values.
|
void |
writeTableRowNumeric(int firstRight,
java.lang.String[] columnValues)
Writes column values with column right aligned as specified.
|
void |
writeTableRowNumeric(java.lang.String[] columnValues)
Writes column values with column 2..n right aligned.
|
close, finalize, flush, list, list, openOutputFile, openOutputWriter, presentInBrowser, startTableIfNecessary, stopTableIfNecessary, write, writeln, writelnNonConverted, writeNonConverted
public HtmlFile(java.lang.String fileName, java.lang.String title, java.lang.String generator) throws java.io.IOException
fileName
- the name / path of the file without extensiontitle
- the title of the HTML filegenerator
- the generatorjava.io.IOException
public HtmlFile(java.lang.String fileName, java.lang.String title, java.lang.String generator, StandardHtmlSettings settings) throws java.io.IOException
fileName
- the name / path of the file without extensiontitle
- the title of the HTML filegenerator
- the generatorsettings
- the standard HTML settingsjava.io.IOException
public HtmlFile(java.io.Writer writer, java.lang.String fileName, java.lang.String title, java.lang.String generator) throws java.io.IOException
writer
- the writer to stream output to - may be null for file outputfileName
- the name / path of the file without extensiontitle
- the title of the HTML filegenerator
- the generatorjava.io.IOException
public HtmlFile(java.io.Writer writer, java.lang.String fileName, java.lang.String title, java.lang.String generator, StandardHtmlSettings settings) throws java.io.IOException
writer
- the writer to stream output to - may be null for file outputfileName
- the name / path of the file without extensiontitle
- the title of the HTML filegenerator
- the generatorsettings
- the standard HTML settingsjava.io.IOException
public void outputHeader()
outputHeader
in class MarkupFile
public void outputHeader(java.lang.String[] additionalLines)
public void outputHeader(boolean printOnLoad)
printOnLoad
- whether body tag should include onLoad="print()"public void outputHeader(boolean printOnLoad, java.lang.String[] additionalLines)
public void beginTable()
public void endTable()
public void beginRow()
public void endRow()
public void outTDb(java.lang.String cellValue)
public void outTDrb(java.lang.String cellValue)
public void outTD(int cellValue)
public void outTD(java.lang.String cellValue)
public void outTDForContent(java.lang.String cellValue)
cellValue
- the cellValue to outputpublic void outTD(java.lang.String cellValue, int colspan)
public void outTDr(int cellValue)
public void outTDr(java.lang.String cellValue)
public void writeTableHeader(java.lang.String[] columnNames)
columnNames
- the column names to usepublic void writeTableRow(java.lang.String[] columnValues)
columnValues
- the column values to writepublic void writeTableRowNumeric(java.lang.String[] columnValues)
columnValues
- the column values to writepublic void writeTableRowNumeric(int firstRight, java.lang.String[] columnValues)
columnValues
- the column values to writefirstRight
- the index of column where the right alignment startsprotected void outputItem(DataObject dataObjectToList, java.lang.String[] columns)
outputItem
in class MarkupFile
dataObjectToList
- the data object to listcolumns
- the columns to listpublic void pageBreak()
public void outputFooter()
outputFooter
in class MarkupFile
protected java.lang.String getConvertedString(char charToConvert)
getConvertedString
in class MarkupFile
charToConvert
- the char to convertprotected java.lang.String getConvertedStringForContent(java.lang.String content)
content
- the content to convertpublic void println(java.lang.String line)
line
- public void printlnNonConverted(java.lang.String line)
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de