celeboss.ui
Class ShareBlockTableModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended byceleboss.ui.SortedTableModel
          extended byceleboss.ui.MonitorableTableModel
              extended byceleboss.ui.ShareBlockTableModel
All Implemented Interfaces:
java.util.EventListener, java.beans.PropertyChangeListener, java.io.Serializable, javax.swing.table.TableModel

public class ShareBlockTableModel
extends MonitorableTableModel

This table model attaches to a Portfolio and display the share details. It reacts to the dynamic changes to the Portfolio and shares.

Version:
1.0
Author:
bevans
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class celeboss.ui.MonitorableTableModel
MonitorableTableModel.ColumnSpec
 
Field Summary
static int NAME
          Index of the Celebrity name column
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
ShareBlockTableModel(Portfolio monitor)
          Create a model that monitors the specified factory.
 
Method Summary
protected  java.lang.Object getCellValue(java.lang.Object row, int column)
          Get the object value at the specified cell.
 void propertyChange(java.beans.PropertyChangeEvent event)
          A change has occured to one of the montiored entities.
 void release()
          This method releases all references to the model and celebrities.
 
Methods inherited from class celeboss.ui.MonitorableTableModel
addObject, getColumnClass, getColumnCount, getColumnName, removeObject
 
Methods inherited from class celeboss.ui.SortedTableModel
addObject, cellUpdated, getRow, getRowCount, getRowId, getValueAt, removeObject, sortByColumn
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, 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

NAME

public static final int NAME
Index of the Celebrity name column

See Also:
Constant Field Values
Constructor Detail

ShareBlockTableModel

public ShareBlockTableModel(Portfolio monitor)
Create a model that monitors the specified factory.

Parameters:
monitor - Portfolio to monitor.
Method Detail

getCellValue

protected java.lang.Object getCellValue(java.lang.Object row,
                                        int column)
Get the object value at the specified cell.

Specified by:
getCellValue in class SortedTableModel
Parameters:
row - Object to extract value.
column - COlumn index
Returns:
Object at the specified cell.

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
A change has occured to one of the montiored entities. This change may be a new Celebrity or a change value.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Overrides:
propertyChange in class MonitorableTableModel
Parameters:
event - Description of event

release

public void release()
This method releases all references to the model and celebrities.

Overrides:
release in class MonitorableTableModel