org.opends.server.util.table
Class TableSerializer

java.lang.Object
  extended by org.opends.server.util.table.TableSerializer

public abstract class TableSerializer
extends java.lang.Object

An interface for serializing tables.

The default implementation for each method is to do nothing. Implementations must override methods as required.


Constructor Summary
protected TableSerializer()
          Create a new table serializer.
 
Method Summary
 void addCell(java.lang.String s)
          Prints a table cell.
 void addColumn(int width)
          Defines a column in the table.
 void addHeading(java.lang.String s)
          Prints a column heading.
 void endContent()
          Finish printing the table contents.
 void endHeader()
          Finish printing the column headings.
 void endRow()
          Finish printing the current row of the table.
 void endTable()
          Finish printing the table.
 void startContent()
          Prepare to start printing the table contents.
 void startHeader()
          Prepare to start printing the column headings.
 void startRow()
          Prepare to start printing a new row of the table.
 void startTable(int height, int width)
          Start a new table having the specified number of rows and columns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableSerializer

protected TableSerializer()
Create a new table serializer.

Method Detail

addCell

public void addCell(java.lang.String s)
Prints a table cell.

Parameters:
s - The cell contents.

addColumn

public void addColumn(int width)
Defines a column in the table.

Parameters:
width - The width of the column in characters.

addHeading

public void addHeading(java.lang.String s)
Prints a column heading.

Parameters:
s - The column heading.

endContent

public void endContent()
Finish printing the table contents.


endHeader

public void endHeader()
Finish printing the column headings.


endRow

public void endRow()
Finish printing the current row of the table.


endTable

public void endTable()
Finish printing the table.


startContent

public void startContent()
Prepare to start printing the table contents.


startHeader

public void startHeader()
Prepare to start printing the column headings.


startRow

public void startRow()
Prepare to start printing a new row of the table.


startTable

public void startTable(int height,
                       int width)
Start a new table having the specified number of rows and columns.

Parameters:
height - The number of rows in the table.
width - The number of columns in the table.