|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jbudget.io.EventDispatcher
public class EventDispatcher
A class that contains methods for delivering data related events to registered listeners.
| Nested Class Summary | |
|---|---|
static interface |
EventDispatcher.AccountListener
|
static interface |
EventDispatcher.AllocationListener
|
static interface |
EventDispatcher.BudgetListener
|
static interface |
EventDispatcher.DataSourceListener
Interface that is used by the components that want to receive updates notifying them that the data directory has been changed. |
static interface |
EventDispatcher.MonthListener
|
static interface |
EventDispatcher.TransactionListener
|
static interface |
EventDispatcher.UserListener
|
| Field Summary | |
|---|---|
private java.util.List<EventDispatcher.AccountListener> |
accountListeners
A list of listeners that receive account updates |
private java.util.List<EventDispatcher.AllocationListener> |
allocationListeners
A list of listeners that receive allocation updates |
private java.util.List<EventDispatcher.BudgetListener> |
budgetListeners
A list of listeners that receive budget updates |
private java.util.List<EventDispatcher.DataSourceListener> |
dataSourceListeners
A list of listeners that receive data directory updates |
private java.util.List<EventDispatcher.MonthListener> |
monthListeners
A list of listeners that receive month updates |
private java.util.List<EventDispatcher.TransactionListener> |
transactionListeners
A list of listeners that receive transaction updates |
private java.util.List<EventDispatcher.UserListener> |
userListeners
A list of listeners that receive account updates |
| Constructor Summary | |
|---|---|
EventDispatcher()
Creates a new instance of EventDispatcher |
|
| Method Summary | |
|---|---|
void |
addAccountListener(EventDispatcher.AccountListener listener)
|
void |
addAllocationListener(EventDispatcher.AllocationListener listener)
|
void |
addBudgetListener(EventDispatcher.BudgetListener listener)
|
void |
addDataSourceListener(EventDispatcher.DataSourceListener listener)
|
void |
addMonthListener(EventDispatcher.MonthListener listener)
|
void |
addTransactionListener(EventDispatcher.TransactionListener listener)
|
void |
addUserListener(EventDispatcher.UserListener listener)
|
void |
fireAccountAdded(org.jbudget.Core.Account account)
Notifies all listeners that have registered to receive account updates events that an account was added |
void |
fireAccountRemoved(int accountId)
Notifies all listeners that have registered to receive account updates events that an account was removed |
void |
fireAccountUpdated(org.jbudget.Core.Account account)
Notifies all listeners that have registered to receive account updates events that an account was added |
void |
fireAllocationAdded(org.jbudget.Core.Transaction allocation)
Notifies all listeners that have registered to receive allocation update events that an allocation was added |
void |
fireAllocationRemoved(java.util.List<org.jbudget.Core.Transaction.Transfer> transfers,
int cDay,
int cMonth,
int cYear)
Notifies all listeners that have registered to receive allocation update events that an allocation that occurred on a specific date was removed |
void |
fireBudgetAdded(org.jbudget.Core.Budget budget)
Notifies all listeners that have registered to receive budget update events that a budget was added |
void |
fireBudgetRemoved(int budgetId)
Notifies all listeners that have registered to receive budget update events that a budget was removed |
void |
fireDataDirChanged()
Notifies all registered listeners that the data directory has changed. |
void |
fireMonthAdded(org.jbudget.Core.Month month)
Notifies all listeners that have registered to receive month update events that a month was added |
void |
fireMonthRemoved(int cMonth,
int cYear)
Notifies all listeners that have registered to receive month update events that a month was removed |
void |
fireMonthUpdated(org.jbudget.Core.Month month)
Notifies all listeners that have registered to receive month update events that a month was updated |
void |
fireTransactionAdded(org.jbudget.Core.Transaction transaction)
Notifies all listeners that have registered to receive transaction update events that a transaction was added |
void |
fireTransactionRemoved(java.util.List<org.jbudget.Core.Transaction.Transfer> transfers,
int cDay,
int cMonth,
int cYear)
Notifies all listeners that have registered to receive transaction update events that a transaction that occured on a specific date was removed |
void |
fireUserAdded(org.jbudget.Core.User user)
Notifies all listeners that have registered to receive user updates events that a user was added |
void |
fireUserChanged(org.jbudget.Core.User user)
Notifies all listeners that have registered to receive user updates events that the current user has changed. |
void |
fireUserRemoved(int uid)
Notifies all listeners that have registered to receive user updates events that a user was removed |
void |
removeAccountListener(EventDispatcher.AccountListener listener)
|
void |
removeAllocationListener(EventDispatcher.AllocationListener listener)
|
void |
removeBudgetListener(EventDispatcher.BudgetListener listener)
|
void |
removeDataSourceListener(EventDispatcher.DataSourceListener listener)
|
void |
removeMonthListener(EventDispatcher.MonthListener listener)
|
void |
removeTransactionListener(EventDispatcher.TransactionListener listener)
|
void |
removeUserListener(EventDispatcher.UserListener listener)
|
| 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<EventDispatcher.BudgetListener> budgetListeners
private final java.util.List<EventDispatcher.MonthListener> monthListeners
private final java.util.List<EventDispatcher.AccountListener> accountListeners
private final java.util.List<EventDispatcher.UserListener> userListeners
private final java.util.List<EventDispatcher.TransactionListener> transactionListeners
private final java.util.List<EventDispatcher.AllocationListener> allocationListeners
private final java.util.List<EventDispatcher.DataSourceListener> dataSourceListeners
| Constructor Detail |
|---|
public EventDispatcher()
| Method Detail |
|---|
public void addBudgetListener(EventDispatcher.BudgetListener listener)
public void removeBudgetListener(EventDispatcher.BudgetListener listener)
public void addUserListener(EventDispatcher.UserListener listener)
public void removeUserListener(EventDispatcher.UserListener listener)
public void addAccountListener(EventDispatcher.AccountListener listener)
public void removeAccountListener(EventDispatcher.AccountListener listener)
public void addMonthListener(EventDispatcher.MonthListener listener)
public void removeMonthListener(EventDispatcher.MonthListener listener)
public void addTransactionListener(EventDispatcher.TransactionListener listener)
public void removeTransactionListener(EventDispatcher.TransactionListener listener)
public void removeAllocationListener(EventDispatcher.AllocationListener listener)
public void addAllocationListener(EventDispatcher.AllocationListener listener)
public void removeDataSourceListener(EventDispatcher.DataSourceListener listener)
public void addDataSourceListener(EventDispatcher.DataSourceListener listener)
public void fireBudgetAdded(org.jbudget.Core.Budget budget)
public void fireBudgetRemoved(int budgetId)
public void fireAccountAdded(org.jbudget.Core.Account account)
public void fireAccountUpdated(org.jbudget.Core.Account account)
public void fireAccountRemoved(int accountId)
public void fireUserAdded(org.jbudget.Core.User user)
public void fireUserRemoved(int uid)
public void fireUserChanged(org.jbudget.Core.User user)
public void fireMonthAdded(org.jbudget.Core.Month month)
public void fireMonthRemoved(int cMonth,
int cYear)
public void fireMonthUpdated(org.jbudget.Core.Month month)
public void fireTransactionAdded(org.jbudget.Core.Transaction transaction)
public void fireTransactionRemoved(java.util.List<org.jbudget.Core.Transaction.Transfer> transfers,
int cDay,
int cMonth,
int cYear)
public void fireAllocationAdded(org.jbudget.Core.Transaction allocation)
public void fireAllocationRemoved(java.util.List<org.jbudget.Core.Transaction.Transfer> transfers,
int cDay,
int cMonth,
int cYear)
public void fireDataDirChanged()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||