18 package org.turro.financials.register;
20 import java.text.NumberFormat;
21 import org.turro.financials.model.business.CompanyWrapper;
22 import org.turro.i18n.I_;
23 import org.zkoss.zk.ui.ext.AfterCompose;
24 import org.zkoss.zul.Tree;
25 import org.zkoss.zul.Treechildren;
26 import org.zkoss.zul.Treecol;
27 import org.zkoss.zul.Treecols;
33 public class BalanceTree extends Tree implements AfterCompose {
35 private Treechildren children;
37 private NumberFormat currencyFormatter;
55 children.getChildren().clear();
59 private void addColumns() {
60 Treecols cols =
new Treecols();
61 cols.setSizable(
true);
64 Treecol col =
new Treecol();
66 col.setWidth(
"220px");
67 cols.appendChild(col);
70 col.setLabel(
I_.
get(
"Description"));
71 cols.appendChild(col);
74 col.setLabel(
I_.
get(
"Debit"));
75 col.setAlign(
"right");
76 col.setWidth(
"170px");
77 cols.appendChild(col);
80 col.setLabel(
I_.
get(
"Credit"));
81 col.setAlign(
"right");
82 col.setWidth(
"170px");
83 cols.appendChild(col);
86 col.setLabel(
I_.
get(
"Balance"));
87 col.setAlign(
"right");
88 col.setWidth(
"170px");
89 cols.appendChild(col);
93 cols.appendChild(col);
96 private void addChildrenSpace() {
97 children =
new Treechildren();
98 appendChild(children);
104 children.appendChild(bti);
109 return currencyFormatter.format(value);
static NumberFormat getCurrencyFormatter()
String formatCurrency(double value)
void setFilter(BalanceFilter filter)
BalanceFilter getFilter()
static String get(String msg)