jgnash.ui.register.table
Class SortedInvestmentTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
jgnash.ui.register.table.AbstractRegisterTableModel
jgnash.ui.register.table.InvestmentRegisterTableModel
jgnash.ui.register.table.SortedInvestmentTableModel
- All Implemented Interfaces:
- java.io.Serializable, javax.swing.table.TableModel, MessageListener, AccountTableModel, PackableTableModel, SortableTableModel
public class SortedInvestmentTableModel
- extends InvestmentRegisterTableModel
- implements SortableTableModel
Sorts the account transactions.
- Version:
- $Id$
- Author:
- Craig Cavanaugh
- See Also:
- Serialized Form
| Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
| Methods inherited from class jgnash.ui.register.table.AbstractRegisterTableModel |
dispose, getAccount, getColumnClass, getColumnCount, getColumnMapping, getColumnName, getColumnNames, getColumnVisibility, getPreferredColumnWeights, getReconcileSymbol, getValueAt, indexOf, isColumnVisible, setColumnVisibility, setColumnVisible, setPreferredColumnWeigths, setReconcileSymbol |
| 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 |
| Methods inherited from interface javax.swing.table.TableModel |
addTableModelListener, isCellEditable, removeTableModelListener, setValueAt |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
transactions
private Transaction[] transactions
sortColumn
private int sortColumn
ascending
private boolean ascending
sortedColumnMap
private boolean[] sortedColumnMap
sortColumns
private boolean[] sortColumns
mutex
private final java.lang.Object mutex
SortedInvestmentTableModel
public SortedInvestmentTableModel(Account account)
isSortable
public boolean isSortable(int col)
- Specified by:
isSortable in interface SortableTableModel
- See Also:
SortableTableModel.isSortable(int)
getSortableColumns
private boolean[] getSortableColumns()
buildColumnMap
protected void buildColumnMap()
- Overrides the super to build the sort column map
- Overrides:
buildColumnMap in class AbstractRegisterTableModel
- See Also:
AbstractRegisterTableModel.buildColumnMap()
getTransactions
private void getTransactions()
- Creates a private clone of the account's transactions
getRowCount
public int getRowCount()
- Specified by:
getRowCount in interface javax.swing.table.TableModel- Overrides:
getRowCount in class AbstractRegisterTableModel
getTransactionAt
public Transaction getTransactionAt(int index)
- Overrides:
getTransactionAt in class AbstractRegisterTableModel
getBalanceAt
public java.math.BigDecimal getBalanceAt(int index)
- Get the account balance up to a specified index.
- Overrides:
getBalanceAt in class AbstractRegisterTableModel
- Parameters:
index - the balance of this account at the specified index.
- Returns:
- the balance of the account at the specified index.
messagePosted
public void messagePosted(Message event)
- Specified by:
messagePosted in interface MessageListener- Overrides:
messagePosted in class AbstractRegisterTableModel
getAscending
public boolean getAscending()
- Specified by:
getAscending in interface SortableTableModel
getSortedColumn
public int getSortedColumn()
- Specified by:
getSortedColumn in interface SortableTableModel
sortColumn
public void sortColumn(int col,
boolean ascending1)
- Specified by:
sortColumn in interface SortableTableModel