ptolemy.backtrack.ui
Class BacktrackControllerFrame.HandleTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by ptolemy.backtrack.ui.BacktrackControllerFrame.HandleTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel
Enclosing class:
BacktrackControllerFrame

private class BacktrackControllerFrame.HandleTableModel
extends javax.swing.table.AbstractTableModel

The data store for the list of checkpoint handles.

Since:
Ptolemy II 5.1
Version:
$Id: BacktrackControllerFrame.java 57040 2010-01-27 20:52:32Z cxh $
Author:
Thomas Feng
Accepted Rating:
Red (tfeng)
Proposed Rating:
Red (tfeng)

Field Summary
private  java.lang.String[] _columnNames
          Names of the columns.
private  java.util.List<BacktrackControllerFrame.HandleTableElement> _data
          The list of elements.
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
private BacktrackControllerFrame.HandleTableModel()
           
 
Method Summary
 int getColumnCount()
          Return the number of columns in the list.
 java.lang.String getColumnName(int column)
          Return the name of the specified column.
 int getRowCount()
          Return the number of rows in the list.
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
          Return the object that represents the value at the given row and the given column.
 void insertElement(BacktrackControllerFrame.HandleTableElement element)
          Insert a element to the end of the data store.
 void removeElement(int position)
          Remove the element at the given position from the data store.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_columnNames

private java.lang.String[] _columnNames
Names of the columns.


_data

private java.util.List<BacktrackControllerFrame.HandleTableElement> _data
The list of elements.

Constructor Detail

BacktrackControllerFrame.HandleTableModel

private BacktrackControllerFrame.HandleTableModel()
Method Detail

getColumnCount

public int getColumnCount()
Return the number of columns in the list.

Returns:
The number of columns.

getColumnName

public java.lang.String getColumnName(int column)
Return the name of the specified column.

Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel
Returns:
The column name.

getRowCount

public int getRowCount()
Return the number of rows in the list.

Returns:
The number of rows.

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int columnIndex)
Return the object that represents the value at the given row and the given column. Java will call toString() of the returned object to get it textual representation to be shown in the cell.

Returns:
The value of the given cell.

insertElement

public void insertElement(BacktrackControllerFrame.HandleTableElement element)
Insert a element to the end of the data store. One more row will be added to the checkpoint handle list.

Parameters:
element - The element to be added.

removeElement

public void removeElement(int position)
Remove the element at the given position from the data store.

Parameters:
position - The position of the element.