Search in sources :

Example 1 with SortedListModel

use of jgnash.ui.components.SortedListModel in project jgnash by ccavanaugh.

the class BudgetManagerDialog method buildBudgetModel.

private void buildBudgetModel() {
    final SortedListModel<BudgetObject> model = new SortedListModel<>();
    final Engine e = EngineFactory.getEngine(EngineFactory.DEFAULT);
    Objects.requireNonNull(e);
    for (Budget budget : e.getBudgetList()) {
        model.addElement(new BudgetObject(budget));
    }
    EventQueue.invokeLater(() -> budgetList.setModel(model));
}
Also used : SortedListModel(jgnash.ui.components.SortedListModel) Budget(jgnash.engine.budget.Budget) Engine(jgnash.engine.Engine)

Aggregations

Engine (jgnash.engine.Engine)1 Budget (jgnash.engine.budget.Budget)1 SortedListModel (jgnash.ui.components.SortedListModel)1