+ public void setHasSubAccounts(boolean hasSubAccounts) {
+ this.hasSubAccounts = hasSubAccounts;
+ }
+ public boolean isExpanded() {
+ return expanded;
+ }
+ public void setExpanded(boolean expanded) {
+ this.expanded = expanded;
+ }
+ public void toggleExpanded() {
+ expanded = !expanded;
+ }
+ public void removeAmounts() {
+ if (amounts != null)
+ amounts.clear();
+ }
+ public boolean amountsExpanded() {return amountsExpanded;}
+ public void setAmountsExpanded(boolean flag) {amountsExpanded = flag;}
+ public void toggleAmountsExpanded() {amountsExpanded = !amountsExpanded;}
+ public void propagateAmountsTo(LedgerAccount acc) {
+ for (LedgerAmount a : amounts)
+ a.propagateToAccount(acc);
+ }
+ public boolean allAmountsAreZero() {
+ for (LedgerAmount a : amounts) {
+ if (a.getAmount() != 0)
+ return false;
+ }