18 package org.turro.financials.register;
20 import org.turro.financials.entity.Account;
21 import org.turro.financials.menu.FinancialsMenu;
22 import org.zkoss.zk.ui.event.Event;
23 import org.zkoss.zk.ui.event.EventListener;
24 import org.zkoss.zk.ui.event.Events;
25 import org.zkoss.zk.ui.ext.AfterCompose;
26 import org.zkoss.zul.Toolbarbutton;
27 import org.zkoss.zul.Treecell;
28 import org.zkoss.zul.Treeitem;
29 import org.zkoss.zul.Treerow;
41 this.account = account;
49 private void addCells() {
51 Treerow row =
new Treerow();
52 row.setSclass(
"account");
54 row.appendChild(
new Treecell(account.
getId()));
56 if(
getTree().getFilter().hasTwoGroup()) {
62 row.appendChild(
new Treecell(
getTree().formatCurrency(dA[0])));
63 row.appendChild(
new Treecell(
getTree().formatCurrency(dA[1])));
64 row.appendChild(
new Treecell(
getTree().formatCurrency(dA[0] - dA[1])));
66 Toolbarbutton tb =
new Toolbarbutton();
67 tb.setImage(
"/_zul/images/statement.png");
68 tb.addEventListener(Events.ON_CLICK,
new EventListener() {
70 public void onEvent(Event event)
throws Exception {
71 FinancialsMenu.showStatement(account.
getId() +
"*");
74 Treecell tc =
new Treecell();
BalanceMajorItem getParentItem()
BalanceAccountItem(Account account)
Double[] getAmountsA(String account)
Double[] getAmountsB(String account)
static Treecell getGroupMoneyCell(BalanceTree tree, Double a, Double b)
BalanceFilter getFilter()