nextapp.echo.table
Interface TableColumnModel

All Known Implementing Classes:
DefaultTableColumnModel

public interface TableColumnModel

A representation of a table's columns.


Method Summary
 void addColumn(TableColumn column)
          Adds a table column to the end of the table column model.
 void addColumnModelListener(TableColumnModelListener l)
          Adds a listener for table column model events.
 TableColumn getColumn(int columnIndex)
          Returns the table column found at the specified index.
 int getColumnCount()
          Returns the number of columns in the column model.
 int getColumnIndex(java.lang.Object identifier)
          Returns the index of the table column with the given identifier.
 java.util.Iterator getColumns()
          Returns an iterator over the columns of the column model.
 void moveColumn(int columnIndex, int newIndex)
          Moves a table column to a new index.
 void removeColumn(TableColumn column)
          Remove a table column.
 void removeColumnModelListener(TableColumnModelListener l)
          Removes a listener for table column model events.
 

Method Detail

addColumn

void addColumn(TableColumn column)
Adds a table column to the end of the table column model.

Parameters:
column - The table column to be added.

addColumnModelListener

void addColumnModelListener(TableColumnModelListener l)
Adds a listener for table column model events.

Parameters:
l - The listener to add.

getColumn

TableColumn getColumn(int columnIndex)
Returns the table column found at the specified index.

Parameters:
columnIndex - The index of the TableColumn to return.
Returns:
The table column at the given index.

getColumnCount

int getColumnCount()
Returns the number of columns in the column model.

Returns:
The number of columns specified in this table column model.

getColumnIndex

int getColumnIndex(java.lang.Object identifier)
Returns the index of the table column with the given identifier.

Parameters:
identifier - The identifier of the table column to return.
Returns:
The index of the given table column.
Throws:
java.lang.IllegalArgumentException - if the value of identifier is null or if the no column was found with the given identifier.

getColumns

java.util.Iterator getColumns()
Returns an iterator over the columns of the column model.

Returns:
An iterator over the columns of the column model.

moveColumn

void moveColumn(int columnIndex,
                int newIndex)
Moves a table column to a new index.

Parameters:
columnIndex - The index of the column to move.
newIndex - The index to move the column to.

removeColumn

void removeColumn(TableColumn column)
Remove a table column.

Parameters:
column - The column to remove.

removeColumnModelListener

void removeColumnModelListener(TableColumnModelListener l)
Removes a listener for table column model events.

Parameters:
l - The listener to remove.