|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfc.io.TablePrinter
public class TablePrinter
Prints a table formatted using plain text/ascii characters. Useful for console based output and/or formatted output to a file.
Nested Class Summary | |
---|---|
static class |
TablePrinter.PrintConfig
Configuration object containing for table printing object. |
Constructor Summary | |
---|---|
TablePrinter(int columnCount,
java.io.PrintStream ps,
TablePrinter.PrintConfig config)
Constructs a new table printer. |
|
TablePrinter(int columnCount,
java.io.PrintWriter pw,
TablePrinter.PrintConfig config)
Constructs a new table printer. |
Method Summary | |
---|---|
void |
endRow()
This method should be called to finish the existing row |
void |
endTable()
This method should be called to finish the table |
static void |
main(java.lang.String[] args)
|
void |
printCell(java.lang.String str)
This method should be called to print a new cell in the current row. |
void |
startRow()
This method should be called to start a new row |
void |
startTable()
This method should be called to start the table |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TablePrinter(int columnCount, java.io.PrintStream ps, TablePrinter.PrintConfig config)
columnCount
- the number of columns in the table.
Attemps to print more than these
number of columns will result in
a runtime exception.pw
- the destination print streamconfig
- the printing configurationpublic TablePrinter(int columnCount, java.io.PrintWriter pw, TablePrinter.PrintConfig config)
columnCount
- the number of columns in the table.
Attemps to print more than these
number of columns will result in
a runtime exception.pw
- the destination print writerconfig
- the printing configurationMethod Detail |
---|
public void startTable()
public void endTable()
public void startRow()
public void endRow()
public void printCell(java.lang.String str)
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |