com.ibm.dse.gui
Class IndexedCollectionTableModel

java.lang.Object
  |
  +--javax.swing.table.AbstractTableModel
        |
        +--com.ibm.dse.gui.IndexedCollectionTableModel

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

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, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.
Overrides:
getColumnCount in class javax.swing.table.AbstractTableModel
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.
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel
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.
Overrides:
getRowCount in class javax.swing.table.AbstractTableModel
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.
Overrides:
getValueAt in class javax.swing.table.AbstractTableModel
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.
Overrides:
isCellEditable in class javax.swing.table.AbstractTableModel

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.
Overrides:
setValueAt in class javax.swing.table.AbstractTableModel
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.