コード例 #1
0
  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
  }
コード例 #2
0
 @Override
 public void setIncomeVisible(boolean visible) {
   p.putBoolean(INCOME_VISIBLE, visible);
   model.setIncomeVisible(visible);
   expand();
 }