jgnash.ui.reconcile
Class AbstractReconcileTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
jgnash.ui.reconcile.AbstractReconcileTableModel
- All Implemented Interfaces:
- java.io.Serializable, javax.swing.table.TableModel, MessageListener, PackableTableModel
- Direct Known Subclasses:
- CreditModel, DebitModel
public abstract class AbstractReconcileTableModel
- extends javax.swing.table.AbstractTableModel
- implements MessageListener, PackableTableModel
Model initializes itself by grabbing all of the transactions from the account
and then filters for transactions that have not been reconciled and are
after the startDate(inclusive). Any new transactions added to the account
that are after the start date (reconciled or not) will be added to the list
of transactions shown.
- Version:
- $Id$
- Author:
- Craig Cavanaugh
- See Also:
- Serialized Form
| Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
| 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
account
final Account account
openingDate
private final java.util.Date openingDate
list
private java.util.List<AbstractReconcileTableModel.RecTransaction> list
rb
private final Resource rb
cNames
private java.lang.String[] cNames
cClass
private java.lang.Class<?>[] cClass
columnWidths
private int[] columnWidths
AbstractReconcileTableModel
AbstractReconcileTableModel(Account account,
java.util.Date openingDate)
getPreferredColumnWeights
public int[] getPreferredColumnWeights()
- Specified by:
getPreferredColumnWeights in interface PackableTableModel
loadModel
private void loadModel()
reconcilable
private boolean reconcilable(Transaction t)
isShowable
abstract boolean isShowable(Transaction t)
getColumnCount
public int getColumnCount()
- Returns the number of columns in the model. A
JTable uses this method to determine how many columns it
should create and display by default.
- Specified by:
getColumnCount in interface javax.swing.table.TableModel
- Returns:
- the number of columns in the model
- See Also:
getRowCount()
getColumnName
public java.lang.String getColumnName(int column)
- Specified by:
getColumnName in interface javax.swing.table.TableModel- Overrides:
getColumnName in class javax.swing.table.AbstractTableModel
getColumnClass
public java.lang.Class<?> getColumnClass(int column)
- Specified by:
getColumnClass in interface javax.swing.table.TableModel- Overrides:
getColumnClass in class javax.swing.table.AbstractTableModel
getRowCount
public int getRowCount()
- Returns the number of rows in the model. A
JTable uses this method to determine how many rows it
should display. This method should be quick, as it
is called frequently during rendering.
- Specified by:
getRowCount in interface javax.swing.table.TableModel
- Returns:
- the number of rows in the model
- See Also:
getColumnCount()
getValueAt
public java.lang.Object getValueAt(int rowIndex,
int columnIndex)
- Returns the value for the cell at
columnIndex and
rowIndex.
- Specified by:
getValueAt in interface javax.swing.table.TableModel
- Parameters:
rowIndex - the row whose value is to be queriedcolumnIndex - the column whose value is to be queried
- Returns:
- the value Object at the specified cell
messagePosted
public void messagePosted(Message event)
- Specified by:
messagePosted in interface MessageListener
getReconciledTotal
public java.math.BigDecimal getReconciledTotal()
findTransaction
private AbstractReconcileTableModel.RecTransaction findTransaction(Transaction t)
toggleReconciledState
protected void toggleReconciledState(int index)
selectAll
protected void selectAll()
clearAll
protected void clearAll()
commitChanges
protected void commitChanges()