18 package org.turro.financials.register;
20 import java.util.List;
21 import org.turro.financials.entity.MajorAccount;
22 import org.turro.i18n.I_;
23 import org.turro.zkoss.label.LabelTypes;
24 import org.zkoss.zk.ui.ext.AfterCompose;
25 import org.zkoss.zul.Treecell;
26 import org.zkoss.zul.Treechildren;
27 import org.zkoss.zul.Treeitem;
28 import org.zkoss.zul.Treerow;
29 import org.zkoss.zul.Vbox;
37 private Treechildren children;
38 private boolean loadOnDemand;
42 this.loadOnDemand = loadOnDemand;
56 children.getChildren().clear();
60 private void addCells() {
62 Treerow row =
new Treerow();
63 row.setSclass(
"topItem");
65 row.appendChild(
new Treecell(
I_.
get(
"Account balance")));
66 row.appendChild(
new Treecell(
""));
67 if(
getTree().getFilter().hasTwoGroup()) {
73 row.appendChild(
new Treecell(
getTree().formatCurrency(dA[0])));
74 row.appendChild(
new Treecell(
getTree().formatCurrency(dA[1])));
75 row.appendChild(
new Treecell(
getTree().formatCurrency(dA[0] - dA[1])));
79 private void addChildrenSpace() {
80 children =
new Treechildren();
81 appendChild(children);
91 this.loadOnDemand = loadOnDemand;
94 private void fillFolder() {
95 if(children.getChildren().isEmpty()) {
99 children.appendChild(bmi);
117 Treecell tc =
new Treecell();
118 Vbox vbox =
new Vbox();
119 vbox.setAlign(
"end");
123 tc.appendChild(vbox);
Double[] getAmountsA(String account)
Double[] getAmountsB(String account)
List< MajorAccount > getMajorAccounts(String parent)
BalanceTopItem(boolean loadOnDemand)
BalanceMajorItem getParentItem()
static Treecell getGroupMoneyCell(BalanceTree tree, Double a, Double b)
void setLoadOnDemand(boolean loadOnDemand)
String formatCurrency(double value)
BalanceFilter getFilter()
static String get(String msg)
static Label getCaptionLabel(String value)
static Label getSoftLabel(String value)