|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jbudget.gui.trans.TransactionListModelBase
public abstract class TransactionListModelBase
A model for creating a list of transactions or allocations. An abstract class that is used to create TableModels for lists (the table has only one column) of Transactions or Allocations
| Field Summary | |
|---|---|
private java.util.Comparator<org.jbudget.Core.Transaction> |
comparator
Comparator used for sorting |
protected boolean |
dispose_called
|
protected org.jbudget.Core.TransactionFilter |
filter
current filter |
private java.util.List<TransactionListPanelBase.ModelListener> |
listeners
List of listeners |
protected java.util.List<org.jbudget.Core.Transaction> |
transactions
List of Transactions |
| Constructor Summary | |
|---|---|
TransactionListModelBase()
Creates a new instance of TransactionListModelBase |
|
| Method Summary | |
|---|---|
void |
addTableModelListener(javax.swing.event.TableModelListener l)
|
void |
addTableModelListener(TransactionListPanelBase.ModelListener l)
|
void |
dataSourceChanged()
Method that is called when the data directory has changed. |
(package private) void |
dispose()
|
void |
filterUpdated(org.jbudget.Core.TransactionFilter newFilter,
java.lang.Object initiator)
Changes the filter |
void |
fireStopEditing()
Forces all listeners to stop editing and save the updated values. |
void |
fireTableChanged()
Notifies all listeners that the contents of the list has changed |
java.lang.Class |
getColumnClass(int index)
|
int |
getColumnCount()
|
java.lang.String |
getColumnName(int index)
|
org.jbudget.Core.TransactionFilter |
getFilter()
|
int |
getRowCount()
|
protected abstract java.util.List<org.jbudget.Core.Transaction> |
getTransactions()
Returns a list of transactions. |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
|
int |
indexOf(java.lang.Object key)
Returns the index of an object |
(package private) void |
initialize()
Creates a local list of transactions that satisfy the filtering requirements and sorts them if the comparator is set |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
|
void |
removeTableModelListener(javax.swing.event.TableModelListener l)
|
void |
setComparator(java.util.Comparator<org.jbudget.Core.Transaction> comparator)
Change comparator |
abstract void |
setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
|
void |
userAdded(org.jbudget.Core.User user)
Implementing the interface. |
void |
userChanged(org.jbudget.Core.User user)
Called when the user has changed. |
void |
userRemoved(int uid)
Implementing the interface. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final java.util.List<TransactionListPanelBase.ModelListener> listeners
protected java.util.List<org.jbudget.Core.Transaction> transactions
private java.util.Comparator<org.jbudget.Core.Transaction> comparator
protected org.jbudget.Core.TransactionFilter filter
protected boolean dispose_called
| Constructor Detail |
|---|
public TransactionListModelBase()
| Method Detail |
|---|
void dispose()
public void addTableModelListener(TransactionListPanelBase.ModelListener l)
public void addTableModelListener(javax.swing.event.TableModelListener l)
addTableModelListener in interface javax.swing.table.TableModelpublic void removeTableModelListener(javax.swing.event.TableModelListener l)
removeTableModelListener in interface javax.swing.table.TableModelpublic java.lang.Class getColumnClass(int index)
getColumnClass in interface javax.swing.table.TableModelpublic int getColumnCount()
getColumnCount in interface javax.swing.table.TableModelpublic int getRowCount()
getRowCount in interface javax.swing.table.TableModelpublic java.lang.String getColumnName(int index)
getColumnName in interface javax.swing.table.TableModel
public java.lang.Object getValueAt(int rowIndex,
int columnIndex)
getValueAt in interface javax.swing.table.TableModel
public boolean isCellEditable(int rowIndex,
int columnIndex)
isCellEditable in interface javax.swing.table.TableModel
public abstract void setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
setValueAt in interface javax.swing.table.TableModelpublic void userChanged(org.jbudget.Core.User user)
userChanged in interface EventDispatcher.UserListenerpublic void userRemoved(int uid)
userRemoved in interface EventDispatcher.UserListenerpublic void userAdded(org.jbudget.Core.User user)
userAdded in interface EventDispatcher.UserListenerpublic void dataSourceChanged()
dataSourceChanged in interface EventDispatcher.DataSourceListenerpublic void fireTableChanged()
public void fireStopEditing()
protected abstract java.util.List<org.jbudget.Core.Transaction> getTransactions()
void initialize()
public void filterUpdated(org.jbudget.Core.TransactionFilter newFilter,
java.lang.Object initiator)
filterUpdated in interface FilterChangeListenernewFilter - the new filter object.initiator - reference to the object that initiated the change.public org.jbudget.Core.TransactionFilter getFilter()
public void setComparator(java.util.Comparator<org.jbudget.Core.Transaction> comparator)
setComparator in interface TransactionSorterPanel.TransactionSorterListenerpublic int indexOf(java.lang.Object key)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||