Package org.jppf.utils
Class PropertiesTableFormat
java.lang.Object
org.jppf.utils.PropertiesTableFormat
- Direct Known Subclasses:
HTMLPropertiesTableFormat,TextPropertiesTableFormat
Abstract class for formatters that print the contents of a
Properties object as a string.- Author:
- Laurent Cohen
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final StringThe title of the whole document.protected final StringBufferContains the formatted text. -
Constructor Summary
ConstructorsConstructorDescriptionPropertiesTableFormat(String docTitle) Initialize this formatter with the specified title. -
Method Summary
Modifier and TypeMethodDescriptionvoidcellEnd()Write the prologue of a table cell.voidWrite the separator between 2 cells.voidWrite the prologue of a table cell.voidend()Write the epilogue for the formatted text.formatName(String name) Format the specified property name if needed.voidformatTable(Properties props, String title) Generate the formatted text for a set of properties.getText()Get the formatted text.voidPrint the specified string.voidrowEnd()Write the prologue of a table row.voidrowStart()Write the prologue of a table row.voidstart()Write the prologue for the formatted text.voidtableEnd()Write the prologue of a table.voidtableStart(String title) Write the prologue of a table.
-
Field Details
-
sb
Contains the formatted text. -
docTitle
The title of the whole document.
-
-
Constructor Details
-
PropertiesTableFormat
Initialize this formatter with the specified title.- Parameters:
docTitle- the title of the whole document.
-
-
Method Details
-
getText
Get the formatted text.- Returns:
- the text as a string.
-
start
public void start()Write the prologue for the formatted text. -
end
public void end()Write the epilogue for the formatted text. -
formatTable
Generate the formatted text for a set of properties.- Parameters:
props- the set of properties to format.title- the title of the formatted table.
-
tableStart
Write the prologue of a table.- Parameters:
title- the title for the table.
-
tableEnd
public void tableEnd()Write the prologue of a table. -
rowStart
public void rowStart()Write the prologue of a table row. -
rowEnd
public void rowEnd()Write the prologue of a table row. -
cellStart
public void cellStart()Write the prologue of a table cell. -
cellEnd
public void cellEnd()Write the prologue of a table cell. -
cellSeparator
public void cellSeparator()Write the separator between 2 cells. -
formatName
Format the specified property name if needed.- Parameters:
name- the name to format.- Returns:
- the formatted name as a string.
-
print
Print the specified string.- Parameters:
message- the string to print.
-