org.opensha.refFaultParamDb.gui.addEdit.faultModel
Class FaultModelTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by javax.swing.table.DefaultTableModel
          extended by org.opensha.refFaultParamDb.gui.addEdit.faultModel.FaultModelTableModel
All Implemented Interfaces:
Serializable, TableModel

public class FaultModelTableModel
extends DefaultTableModel

This table model allows to view the fault sections within a fault model

Author:
vipingupta
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
 
Constructor Summary
FaultModelTableModel(ArrayList faultSectionsList)
          Constructs a new, empty FaultDataModel.
 
Method Summary
 Class getColumnClass(int col)
           
 int getColumnCount()
           
 String getColumnName(int col)
           
 int getRowCount()
           
 ArrayList getSelectedFaultSectionsId()
          Get a list of selected fault sections
 Object getValueAt(int row, int col)
           
 boolean isCellEditable(int row, int col)
           
 void setSelected(int faultSectionId, boolean val)
          Select/Deselect the check box
 void setValueAt(Object value, int row, int col)
           
 
Methods inherited from class javax.swing.table.DefaultTableModel
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getDataVector, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount
 
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

FaultModelTableModel

public FaultModelTableModel(ArrayList faultSectionsList)
Constructs a new, empty FaultDataModel.

Method Detail

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface TableModel
Overrides:
getColumnCount in class DefaultTableModel

getColumnClass

public Class getColumnClass(int col)
Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class AbstractTableModel

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface TableModel
Overrides:
getRowCount in class DefaultTableModel

getColumnName

public String getColumnName(int col)
Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class DefaultTableModel

getValueAt

public Object getValueAt(int row,
                         int col)
Specified by:
getValueAt in interface TableModel
Overrides:
getValueAt in class DefaultTableModel

isCellEditable

public boolean isCellEditable(int row,
                              int col)
Specified by:
isCellEditable in interface TableModel
Overrides:
isCellEditable in class DefaultTableModel

setSelected

public void setSelected(int faultSectionId,
                        boolean val)
Select/Deselect the check box

Parameters:
faultSectionId -
val -

getSelectedFaultSectionsId

public ArrayList getSelectedFaultSectionsId()
Get a list of selected fault sections

Returns:

setValueAt

public void setValueAt(Object value,
                       int row,
                       int col)
Specified by:
setValueAt in interface TableModel
Overrides:
setValueAt in class DefaultTableModel