org.jbudget.gui.trans
Class AllocationsListModel

java.lang.Object
  extended by org.jbudget.gui.trans.TransactionListModelBase
      extended by org.jbudget.gui.trans.AllocationsListModel
All Implemented Interfaces:
javax.swing.table.TableModel, FilterChangeListener, TransactionSorterPanel.TransactionSorterListener, EventDispatcher.AllocationListener, EventDispatcher.DataSourceListener, EventDispatcher.UserListener

public class AllocationsListModel
extends TransactionListModelBase
implements EventDispatcher.AllocationListener

A TableModel for displaying a list of Transactions.

Author:
petrov

Field Summary
 
Fields inherited from class org.jbudget.gui.trans.TransactionListModelBase
dispose_called, filter, transactions
 
Constructor Summary
AllocationsListModel()
           
 
Method Summary
 void allocationAdded(org.jbudget.Core.Transaction allocation)
          Called when an allocation is added to the month.
 void allocationRemoved(java.util.List<org.jbudget.Core.Transaction.Transfer> transfers, int cDay, int cMonth, int cYear)
          Called when an allocation is removed from the month.
 void dataSourceChanged()
          Method that is called when the data directory has changed.
 void dispose()
           
 void finalize()
           
 java.lang.String getColumnName(int index)
           
protected  java.util.List<org.jbudget.Core.Transaction> getTransactions()
          Returns a list of transactions.
 void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
           
 
Methods inherited from class org.jbudget.gui.trans.TransactionListModelBase
addTableModelListener, addTableModelListener, filterUpdated, fireStopEditing, fireTableChanged, getColumnClass, getColumnCount, getFilter, getRowCount, getValueAt, indexOf, initialize, isCellEditable, removeTableModelListener, setComparator, userAdded, userChanged, userRemoved
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AllocationsListModel

public AllocationsListModel()
Method Detail

dispose

public void dispose()
Overrides:
dispose in class TransactionListModelBase

finalize

public void finalize()
Overrides:
finalize in class java.lang.Object

getTransactions

protected java.util.List<org.jbudget.Core.Transaction> getTransactions()
Description copied from class: TransactionListModelBase
Returns a list of transactions.

Specified by:
getTransactions in class TransactionListModelBase

setValueAt

public void setValueAt(java.lang.Object aValue,
                       int rowIndex,
                       int columnIndex)
Specified by:
setValueAt in interface javax.swing.table.TableModel
Specified by:
setValueAt in class TransactionListModelBase

getColumnName

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

allocationAdded

public void allocationAdded(org.jbudget.Core.Transaction allocation)
Called when an allocation is added to the month.

Specified by:
allocationAdded in interface EventDispatcher.AllocationListener

allocationRemoved

public void allocationRemoved(java.util.List<org.jbudget.Core.Transaction.Transfer> transfers,
                              int cDay,
                              int cMonth,
                              int cYear)
Called when an allocation is removed from the month.

Specified by:
allocationRemoved in interface EventDispatcher.AllocationListener

dataSourceChanged

public void dataSourceChanged()
Method that is called when the data directory has changed.

Specified by:
dataSourceChanged in interface EventDispatcher.DataSourceListener
Overrides:
dataSourceChanged in class TransactionListModelBase