edu.ucla.stat.SOCR.motionchart
Class MotionTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by edu.ucla.stat.SOCR.util.tablemodels.SortedTableModel
          extended by edu.ucla.stat.SOCR.motionchart.MotionTableModel
All Implemented Interfaces:
SortOrderConstants, java.io.Serializable, java.util.EventListener, javax.swing.event.TableModelListener, javax.swing.table.TableModel

public class MotionTableModel
extends SortedTableModel

Package: edu.ucla.stat.SOCR.motionchart User: Khashim Date: Dec 2, 2008 Time: 12:37:16 AM

Author:
Jameel
See Also:
Serialized Form

Nested Class Summary
protected  class MotionTableModel.MotionRowComparator
           
 
Field Summary
protected  javax.swing.table.TableModel model
          Original TableModel used as data source.
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Fields inherited from interface edu.ucla.stat.SOCR.util.tablemodels.SortOrderConstants
ASCENDING, DESCENDING, NOT_SORTED
 
Constructor Summary
MotionTableModel(javax.swing.table.TableModel model)
          Creates MotionTableModel object with specified TableModel as the data source.
 
Method Summary
protected  void checkMappings()
           
 void fireTableDataChanged()
          Notifies all listeners that all cell values in the table's rows may have changed.
 java.lang.Integer getCategoryMapping()
           
 java.lang.Integer getColorMapping()
           
 java.lang.Class getColumnClass(int columnIndex)
           
 int getColumnCount()
           
 java.lang.String getColumnName(int columnIndex)
           
 java.lang.String getColumnParseString(int columnIndex)
           
 java.util.TreeMap<MotionKey,java.util.ArrayList<java.lang.Integer>> getKeyMap()
           
 java.lang.Integer getKeyMapping()
           
 javax.swing.table.TableModel getModel()
          Returns original TableModel used as data source.
 int getRowCount()
           
 java.lang.Integer getSizeMapping()
           
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
           
 java.lang.Integer getXAxisMapping()
           
 java.lang.Integer getYAxisMapping()
           
 boolean isCellEditable(int rowIndex, int columnIndex)
           
 void setCategoryMapping(int columnIndex)
           
 void setColorMapping(int columnIndex)
           
protected  void setColumnClasses()
           
 void setColumnParseString(java.lang.String parseString, int columnIndex)
           
 void setKeyMapping(int columnIndex)
           
 void setSizeMapping(int columnIndex)
           
 void setXAxisMapping(int columnIndex)
           
 void setYAxisMapping(int columnIndex)
           
 void tableChanged(javax.swing.event.TableModelEvent e)
           
 
Methods inherited from class edu.ucla.stat.SOCR.util.tablemodels.SortedTableModel
checkModel, getColumnSortOrder, getColumnSortRank, getRealRowIndex, getRowComparator, getSortingColumnIndexes, getSortingColumns, getSortingColumnsCount, isColumnAscending, isColumnDescending, isColumnSorted, setModel, setRowComparator, setSortingColumns, setValueAt, sort, sortColumn, sortColumn
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, 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
 

Field Detail

model

protected javax.swing.table.TableModel model
Original TableModel used as data source.

Constructor Detail

MotionTableModel

public MotionTableModel(javax.swing.table.TableModel model)
Creates MotionTableModel object with specified TableModel as the data source.

Parameters:
model - TableModel used as the data source
Method Detail

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int columnIndex)
Specified by:
getValueAt in interface javax.swing.table.TableModel
Overrides:
getValueAt in class SortedTableModel

getColumnClass

public java.lang.Class getColumnClass(int columnIndex)
Specified by:
getColumnClass in interface javax.swing.table.TableModel

getKeyMapping

public java.lang.Integer getKeyMapping()

setKeyMapping

public void setKeyMapping(int columnIndex)

getXAxisMapping

public java.lang.Integer getXAxisMapping()

setXAxisMapping

public void setXAxisMapping(int columnIndex)

getYAxisMapping

public java.lang.Integer getYAxisMapping()

setYAxisMapping

public void setYAxisMapping(int columnIndex)

getSizeMapping

public java.lang.Integer getSizeMapping()

setSizeMapping

public void setSizeMapping(int columnIndex)

getColorMapping

public java.lang.Integer getColorMapping()

setColorMapping

public void setColorMapping(int columnIndex)

getCategoryMapping

public java.lang.Integer getCategoryMapping()

setCategoryMapping

public void setCategoryMapping(int columnIndex)

setColumnParseString

public void setColumnParseString(java.lang.String parseString,
                                 int columnIndex)

getColumnParseString

public java.lang.String getColumnParseString(int columnIndex)

getKeyMap

public java.util.TreeMap<MotionKey,java.util.ArrayList<java.lang.Integer>> getKeyMap()

setColumnClasses

protected void setColumnClasses()

checkMappings

protected void checkMappings()

tableChanged

public void tableChanged(javax.swing.event.TableModelEvent e)
Specified by:
tableChanged in interface javax.swing.event.TableModelListener
Overrides:
tableChanged in class SortedTableModel

fireTableDataChanged

public void fireTableDataChanged()
Notifies all listeners that all cell values in the table's rows may have changed. The number of rows may also have changed and the JTable should redraw the table from scratch. The structure of the table (as in the order of the columns) is assumed to be the same.

Overrides:
fireTableDataChanged in class javax.swing.table.AbstractTableModel
See Also:
TableModelEvent, EventListenerList, JTable.tableChanged(javax.swing.event.TableModelEvent)

getModel

public javax.swing.table.TableModel getModel()
Returns original TableModel used as data source.

Returns:
original TableModel used as data source.

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface javax.swing.table.TableModel

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface javax.swing.table.TableModel

getColumnName

public java.lang.String getColumnName(int columnIndex)
Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
Specified by:
isCellEditable in interface javax.swing.table.TableModel
Overrides:
isCellEditable in class javax.swing.table.AbstractTableModel