wt.clients.csm.search
Class NavNodeSearchResultTableModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended bywt.clients.csm.search.NavNodeSearchResultTableModel
All Implemented Interfaces:
Serializable, TableModel

class NavNodeSearchResultTableModel
extends AbstractTableModel

This class provides a basic model for a table which encapsulates table data in a Vector ("tableContent"). Element of "tableContent" are Vectors containing data of rows in the table. Also it provides basic fuctions to access table data

Since:
1.1.8 & swing-1.1

Field Summary
protected  Vector columnNames
           
protected  int numberOfColumns
           
protected  int numberOfRows
           
protected  Vector tableContent
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
NavNodeSearchResultTableModel(Vector colNames)
          This constructor creates a Vector "tableContent" which encapsulates data of the whole table, initially empty.
 
Method Summary
 Class getColumnClass(int columnIndex)
          Return default String class
 int getColumnCount()
          This function returns numberOfRow of the table.
 String getColumnName(int columnIndex)
          Get the identified column's name
 int getRowCount()
          This function returns numberOfRow of the table.
 Object getValueAt(int rowIndex, int columnIndex)
          This function returns the value of a cell The return is an Object.
 boolean isCellEditable(int rowIndex, int columnIndex)
          This function returns the default value "false" for all cells in the table.
 void setRowCount(int rowCount)
          Set numberOfRow of the table.
 void setValueAt(Object value, int rowIndex, int columnIndex)
          This function sets the identified cell to given value
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tableContent

protected Vector tableContent

numberOfRows

protected int numberOfRows

numberOfColumns

protected int numberOfColumns

columnNames

protected Vector columnNames
Constructor Detail

NavNodeSearchResultTableModel

public NavNodeSearchResultTableModel(Vector colNames)
This constructor creates a Vector "tableContent" which encapsulates data of the whole table, initially empty.

Method Detail

getColumnName

public String getColumnName(int columnIndex)
Get the identified column's name

Parameters:
columnIndex -
Returns:
name of this column

getColumnClass

public Class getColumnClass(int columnIndex)
Return default String class

Parameters:
columnIndex -
Returns:
the class of this column

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
This function returns the default value "false" for all cells in the table. Extended class must override this function to fit it purpose

Parameters:
rowIndex - to identify row
columnIndex - to identify col
Returns:
false as default

getRowCount

public int getRowCount()
This function returns numberOfRow of the table.

Returns:
numberOfRows

setRowCount

public void setRowCount(int rowCount)
Set numberOfRow of the table.


getColumnCount

public int getColumnCount()
This function returns numberOfRow of the table.

Returns:
numberOfColumns

getValueAt

public Object getValueAt(int rowIndex,
                         int columnIndex)
This function returns the value of a cell The return is an Object. The calling agent must cast this to proper type before use.

Parameters:
rowIndex - to identify row
columnIndex - to identify col
Returns:
value of the identified cell as an Object

setValueAt

public void setValueAt(Object value,
                       int rowIndex,
                       int columnIndex)
This function sets the identified cell to given value

Parameters:
rowIndex - to identify row
columnIndex - to identify col
value - of type Object the value the cell is set to
Returns:
none