|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.util.table.TableBuilder
public final class TableBuilder
A class which can be used to construct tables of information to be
displayed in a terminal. Once built the table can be output using a
TableSerializer
.
Constructor Summary | |
---|---|
TableBuilder()
Creates a new table printer. |
Method Summary | |
---|---|
void |
addSortKey(int column)
Adds a table sort key. |
void |
addSortKey(int column,
java.util.Comparator<java.lang.String> comparator)
Adds a table sort key. |
void |
appendCell()
Appends a new blank cell to the current row. |
void |
appendCell(boolean value)
Appends a new cell to the current row containing the provided boolean value. |
void |
appendCell(byte value)
Appends a new cell to the current row containing the provided byte value. |
void |
appendCell(char value)
Appends a new cell to the current row containing the provided char value. |
void |
appendCell(double value)
Appends a new cell to the current row containing the provided double value. |
void |
appendCell(float value)
Appends a new cell to the current row containing the provided float value. |
void |
appendCell(int value)
Appends a new cell to the current row containing the provided integer value. |
void |
appendCell(long value)
Appends a new cell to the current row containing the provided long value. |
void |
appendCell(java.lang.Object value)
Appends a new cell to the current row containing the provided object value. |
void |
appendHeading()
Appends a new blank column heading to the header row. |
void |
appendHeading(Message value)
Appends a new column heading to the header row. |
int |
getRowWidth()
Gets the width of the current row. |
int |
getTableHeight()
Gets the number of rows in table. |
int |
getTableWidth()
Gets the number of columns in table. |
void |
print(TablePrinter printer)
Prints the table in its current state using the provided table printer. |
void |
startRow()
Appends a new row to the table. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TableBuilder()
Method Detail |
---|
public void addSortKey(int column)
column
- The column which will be used as a sort key.public void addSortKey(int column, java.util.Comparator<java.lang.String> comparator)
column
- The column which will be used as a sort key.comparator
- The string comparator.public void appendCell()
public void appendCell(boolean value)
value
- The boolean value.public void appendCell(byte value)
value
- The byte value.public void appendCell(char value)
value
- The char value.public void appendCell(double value)
value
- The double value.public void appendCell(float value)
value
- The float value.public void appendCell(int value)
value
- The boolean value.public void appendCell(long value)
value
- The long value.public void appendCell(java.lang.Object value)
value
- The object value.public void appendHeading()
public void appendHeading(Message value)
value
- The column heading value.public int getRowWidth()
public int getTableHeight()
public int getTableWidth()
public void print(TablePrinter printer)
printer
- The table printer.public void startRow()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |