celeboss.ui
Class PortfolioTableModel

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

public class PortfolioTableModel
extends MonitorableTableModel

This table model attaches to a Portfolio manager and display the portfoilo details. It reacts to the dynamic changes to the PortfolioManger and Portfolio.

Version:
1.0
Author:
bevans
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class celeboss.ui.MonitorableTableModel
MonitorableTableModel.ColumnSpec
 
Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
PortfolioTableModel(CelebrityManager 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
 

Constructor Detail

PortfolioTableModel

public PortfolioTableModel(CelebrityManager monitor)
Create a model that monitors the specified factory.

Parameters:
monitor - Factory 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