public class AccountViewHandler extends Object implements ServiceListener
| Modifier and Type | Field and Description |
|---|---|
protected static Comparator<Account> |
accountLengthComparator
Sort account with label length.
|
protected AccountService |
accountService |
protected static Comparator<String> |
reverseAccountLengthComparator
Sort Account number by lenght in reverse order.
|
protected AccountView |
view |
| Constructor and Description |
|---|
AccountViewHandler(AccountView view) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAccount()
Display add account view
|
void |
addAccount(AccountForm dialog)
Add new account with account form.
|
protected org.jdesktop.swingx.treetable.TreeTableNode |
findParentNode(org.jdesktop.swingx.treetable.TreeTableNode currentNode,
String accountNumber)
Find potential parent node for account number.
|
protected List<org.jdesktop.swingx.treetable.MutableTreeTableNode> |
findSubNodes(org.jdesktop.swingx.treetable.TreeTableNode currentNode,
String accountNumber)
Find all subnodes in currentNode with account label starting with accountNumber.
|
void |
importAccountsChart() |
void |
init()
Init initialized view by loading account data from service.
|
protected void |
loadAllAccounts()
Load all accounts from service and display it into tree table.
|
void |
notifyMethod(String serviceName,
String methodName)
Called when import methods are called on services.
|
void |
removeAccount()
Ask for user to remove for selected account, and remove it if confirmed.
|
void |
updateAccount()
Open update account (or subledger) form with selected account
from the tree.
|
void |
updateAccount(UpdateAccountForm dialog)
Perform update account to service.
|
protected AccountService accountService
protected AccountView view
protected static Comparator<Account> accountLengthComparator
protected static Comparator<String> reverseAccountLengthComparator
public AccountViewHandler(AccountView view)
public void init()
protected void loadAllAccounts()
public void addAccount()
public void addAccount(AccountForm dialog)
dialog - the account formprotected org.jdesktop.swingx.treetable.TreeTableNode findParentNode(org.jdesktop.swingx.treetable.TreeTableNode currentNode,
String accountNumber)
currentNode - nodeaccountNumber - node label to search parentprotected List<org.jdesktop.swingx.treetable.MutableTreeTableNode> findSubNodes(org.jdesktop.swingx.treetable.TreeTableNode currentNode, String accountNumber)
currentNode - currentNode to search intoaccountNumber - accountNumber number to searchpublic void updateAccount()
public void updateAccount(UpdateAccountForm dialog)
dialog - dialog containing accountpublic void removeAccount()
public void importAccountsChart()
public void notifyMethod(String serviceName, String methodName)
notifyMethod in interface ServiceListenerCopyright © 2008–2013 CodeLutin. All rights reserved.