jAudioFeatureExtractor
Class FeatureSelectorTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by javax.swing.table.DefaultTableModel
          extended by jAudioFeatureExtractor.FeatureSelectorTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class FeatureSelectorTableModel
extends javax.swing.table.DefaultTableModel

A table model used by the FeatureSelectorPanel to store references to feature definitions.

Provides methods to fill a table row by row. Makes all except the first column non-editable. The first column is filled with check boxes.

Author:
Cory McKay
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.DefaultTableModel
columnIdentifiers, dataVector
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Method Summary
 void clearTable()
           
 void fillTable(FeatureDefinition[] definitions, boolean[] feature_save_defaults, boolean[] is_primary_feature)
          Deletes everything in the table and then fills it up one row at a time based on the given FeatureDefinition array.
 java.lang.Class getColumnClass(int column)
          Returns the type of class used for each column.
 boolean isCellEditable(int row, int column)
          Returns false for all cells except those in the first column, so that only cells in the first column are editable.
 
Methods inherited from class javax.swing.table.DefaultTableModel
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getColumnCount, getColumnName, getDataVector, getRowCount, getValueAt, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount, setValueAt
 
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
 

Method Detail

fillTable

public void fillTable(FeatureDefinition[] definitions,
                      boolean[] feature_save_defaults,
                      boolean[] is_primary_feature)
Deletes everything in the table and then fills it up one row at a time based on the given FeatureDefinition array.

Parameters:
definitions - Data to place in the table.
feature_save_defaults - The default save setting for each feature.

clearTable

public void clearTable()

getColumnClass

public java.lang.Class getColumnClass(int column)
Returns the type of class used for each column. Necessary in order for text boxes to be properly displayed.

Specified by:
getColumnClass in interface javax.swing.table.TableModel
Overrides:
getColumnClass in class javax.swing.table.AbstractTableModel
Parameters:
column - Column to check.

isCellEditable

public boolean isCellEditable(int row,
                              int column)
Returns false for all cells except those in the first column, so that only cells in the first column are editable.

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