use of name.abuchen.portfolio.snapshot.GroupEarningsByAccount in project portfolio by buchen.
the class PerformanceView method reportingPeriodUpdated.
@Override
public void reportingPeriodUpdated() {
ReportingPeriod period = getReportingPeriod();
CurrencyConverter converter = new CurrencyConverterImpl(factory, getClient().getBaseCurrency());
Client filteredClient = clientFilter.getSelectedFilter().filter(getClient());
ClientPerformanceSnapshot snapshot = new ClientPerformanceSnapshot(filteredClient, converter, period);
try {
calculation.getTree().setRedraw(false);
calculation.setInput(snapshot);
calculation.expandAll();
calculation.getTree().getParent().layout();
} finally {
calculation.getTree().setRedraw(true);
}
snapshotStart.setInput(snapshot.getStartClientSnapshot(), clientFilter.getSelectedFilter());
snapshotEnd.setInput(snapshot.getEndClientSnapshot(), clientFilter.getSelectedFilter());
earnings.setInput(snapshot.getEarnings());
earningsByAccount.setInput(new GroupEarningsByAccount(snapshot).getItems());
taxes.setInput(snapshot.getTaxes());
fees.setInput(snapshot.getFees());
}
Aggregations