IBM Branch Transformation Toolkit Javadoc

com.ibm.dse.gui
Class IndexedCollectionTableModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended bycom.ibm.dse.gui.IndexedCollectionTableModel
All Implemented Interfaces:
java.io.Serializable, SpTableModel, javax.swing.table.TableModel

public class IndexedCollectionTableModel
extends javax.swing.table.AbstractTableModel
implements SpTableModel

The IndexedCollectionTableModel class implements a TableModel for SpTable class. It works with an IndexedCollection of KeyedCollections.

See Also:
Serialized Form

Field Summary
(package private)  java.lang.String[] columnDataNames
           
(package private)  java.lang.String[] columnNames
           
(package private)  java.util.Hashtable columns
           
(package private)  int[] columnSize
           
(package private)  IndexedCollection iCol
           
(package private)  int NbOfColumns
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
IndexedCollectionTableModel()
          This constructor creates an IndexedCollectionTableModel object.
IndexedCollectionTableModel(IndexedCollection c)
          This constructor creates an IndexedCollectionTableModel object.
 
Method Summary
 int getColumnCount()
          Returns the number of columns.
 java.lang.String getColumnDataName(int columnIndex)
          Returns the name of the data column at columnIndex.
 java.lang.String getColumnName(int columnIndex)
          Returns the name of the column at columnIndex.
 int getColumnSize(int columnIndex)
          Returns the size of the column at columnIndex.
 DataElement getDataElement(int arg1, int arg2)
          Returns the cell DataElement at row=arg1 and column=arg2.
 IndexedCollection getICol()
          Gets the IndexedCollection property value.
 int getRowCount()
          Returns the number of rows.
 java.lang.Object getValueAt(int arg1, int arg2)
          Returns the cell value at row=arg1 and column=arg2.
 boolean isCellEditable(int arg1, int arg2)
          Returns true for all cells.
 void setICol(IndexedCollection ic)
          Sets the IndexedCollection property value.
 void setValueAt(java.lang.Object arg1, int arg2, int arg3)
          Sets the value for the element row(arg2) and column(arg3).
 void updateColumns(VectorEditor v)
          Updates column values with the vector passed as argument.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, removeTableModelListener
 

Field Detail

columnNames

java.lang.String[] columnNames

columnDataNames

java.lang.String[] columnDataNames

columnSize

int[] columnSize

columns

java.util.Hashtable columns

iCol

IndexedCollection iCol

NbOfColumns

int NbOfColumns
Constructor Detail

IndexedCollectionTableModel

public IndexedCollectionTableModel()
This constructor creates an IndexedCollectionTableModel object.


IndexedCollectionTableModel

public IndexedCollectionTableModel(IndexedCollection c)
This constructor creates an IndexedCollectionTableModel object.

Parameters:
c - com.ibm.dse.base.IndexedCollection, ICol property value.
Method Detail

getColumnCount

public int getColumnCount()
Returns the number of columns.

Specified by:
getColumnCount in interface javax.swing.table.TableModel
Returns:
int - the number of columns

getColumnDataName

public java.lang.String getColumnDataName(int columnIndex)
Returns the name of the data column at columnIndex.

Specified by:
getColumnDataName in interface SpTableModel
Parameters:
columnIndex - int, the column.
Returns:
java.lang.String - the column data name

getColumnName

public java.lang.String getColumnName(int columnIndex)
Returns the name of the column at columnIndex.

Specified by:
getColumnName in interface javax.swing.table.TableModel
Parameters:
columnIndex - int, the column.
Returns:
java.lang.String - the column name

getColumnSize

public int getColumnSize(int columnIndex)
Returns the size of the column at columnIndex.

Specified by:
getColumnSize in interface SpTableModel
Parameters:
columnIndex - int, the column.
Returns:
int - the column size

getDataElement

public DataElement getDataElement(int arg1,
                                  int arg2)
Returns the cell DataElement at row=arg1 and column=arg2.

Specified by:
getDataElement in interface SpTableModel
Parameters:
arg1 - int, the row
arg2 - int, the column
Returns:
DataElement - the DataElement at the specified cell

getICol

public IndexedCollection getICol()
Gets the IndexedCollection property value.

Specified by:
getICol in interface SpTableModel
Returns:
com.ibm.dse.base.IndexedCollection, the IndexedCollection associated to the model

getRowCount

public int getRowCount()
Returns the number of rows.

Specified by:
getRowCount in interface javax.swing.table.TableModel
Returns:
int - the number of rows

getValueAt

public java.lang.Object getValueAt(int arg1,
                                   int arg2)
Returns the cell value at row=arg1 and column=arg2.

Specified by:
getValueAt in interface javax.swing.table.TableModel
Parameters:
arg1 - int, the row
arg2 - int, the column
Returns:
Object - the Object at the specified cell

isCellEditable

public boolean isCellEditable(int arg1,
                              int arg2)
Returns true for all cells.

Specified by:
isCellEditable in interface javax.swing.table.TableModel

setICol

public void setICol(IndexedCollection ic)
Sets the IndexedCollection property value.

Specified by:
setICol in interface SpTableModel
Parameters:
ic - com.ibm.dse.base.IndexedCollection, the IndexedCollection associated to the model

setValueAt

public void setValueAt(java.lang.Object arg1,
                       int arg2,
                       int arg3)
Sets the value for the element row(arg2) and column(arg3). aValue is the new value.

Specified by:
setValueAt in interface javax.swing.table.TableModel
Parameters:
arg1 - Object, the new value
arg2 - int, the row to be updated
arg3 - int, the column to be updated
See Also:
#getValueAt()

updateColumns

public void updateColumns(VectorEditor v)
Updates column values with the vector passed as argument.

Specified by:
updateColumns in interface SpTableModel
Parameters:
v - com.ibm.dse.gui.VectorEditor, a vector that contains as first element the table name and in the rest elements each of the ColumnFormatters corresponding to each column table.

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005