+ return isVisible(Data.accounts.get());
+ }
+ public boolean isVisible(ArrayList<LedgerAccount> list) {
+ for (LedgerAccount acc : list) {
+ if (acc.isParentOf(this)) {
+ if (!acc.isExpanded()) return false;
+ }
+ }
+ return true;
+ }
+ public boolean isParentOf(LedgerAccount potentialChild) {
+ return potentialChild.getName().startsWith(name + ":");
+ }
+ public boolean isHiddenByStar() {
+ return hiddenByStar;
+ }
+ public void setHiddenByStar(boolean hiddenByStar) {
+ this.hiddenByStar = hiddenByStar;
+ }