edu.cmu.cs.sb.drem
Class DREMGui_FilterGOModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by edu.cmu.cs.sb.drem.DREMGui_FilterGOModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class DREMGui_FilterGOModel
extends javax.swing.table.AbstractTableModel

Class implements a table model, which is used for the define gene set table

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
DREMGui_FilterGOModel(java.lang.Object[][] data, java.lang.String[] columnNames)
          Initializes the table model with the data, columnNames, and tga parameters
 
Method Summary
 java.lang.Class getColumnClass(int c)
          Returns the Class type of column c
 int getColumnCount()
          Returns the number of columns
 java.lang.String getColumnName(int ncol)
          Returns the column name of ncol
 int getRowCount()
          Returns the number of rows
 java.lang.Object getValueAt(int nrow, int ncol)
          Returns the value in the table in row nrow and column ncol
 boolean isCellEditable(int rowIndex, int ColumnIndex)
          Returns true if ColumnIndex is 1, otherwise returns false
 void setValueAt(java.lang.Object value, int row, int col)
          Sets the value in the table in row nrow and column ncol to the contents of value and then calls fireTableCellUpdated.
 
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
 

Constructor Detail

DREMGui_FilterGOModel

public DREMGui_FilterGOModel(java.lang.Object[][] data,
                             java.lang.String[] columnNames)
Initializes the table model with the data, columnNames, and tga parameters

Method Detail

getColumnClass

public java.lang.Class getColumnClass(int c)
Returns the Class type of column c

Specified by:
getColumnClass in interface javax.swing.table.TableModel
Overrides:
getColumnClass in class javax.swing.table.AbstractTableModel

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int ColumnIndex)
Returns true if ColumnIndex is 1, otherwise returns false

Specified by:
isCellEditable in interface javax.swing.table.TableModel
Overrides:
isCellEditable in class javax.swing.table.AbstractTableModel

getColumnCount

public int getColumnCount()
Returns the number of columns


getRowCount

public int getRowCount()
Returns the number of rows


getColumnName

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

Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel

getValueAt

public java.lang.Object getValueAt(int nrow,
                                   int ncol)
Returns the value in the table in row nrow and column ncol


setValueAt

public void setValueAt(java.lang.Object value,
                       int row,
                       int col)
Sets the value in the table in row nrow and column ncol to the contents of value and then calls fireTableCellUpdated. This method will only be called with ncol set to 1 since that is the only editable table in the column. value is assumed to be a Boolean object and thus true or false. Updates the tga.nGeneSet count, to the number of genes selected. Updates whether the gene in the row is selected in the tga.htGeneNames table.

Specified by:
setValueAt in interface javax.swing.table.TableModel
Overrides:
setValueAt in class javax.swing.table.AbstractTableModel