private void buildUI() { setMinimumSize(new Dimension(100, 100)); setViewportView(createModelAndView()); // visibility must be set after createModelAndView has been called model.setAccountVisible(p.getBoolean(ACCOUNT_VISIBLE, true)); model.setExpenseVisible(p.getBoolean(EXPENSE_VISIBLE, true)); model.setHiddenVisible(p.getBoolean(HIDDEN_VISIBLE, true)); model.setIncomeVisible(p.getBoolean(INCOME_VISIBLE, true)); refresh(); // load the tree up with data _expand(); // expand the tree }
@Override public void setIncomeVisible(boolean visible) { p.putBoolean(INCOME_VISIBLE, visible); model.setIncomeVisible(visible); expand(); }