Search in sources :

Example 1 with GroupEarningsByAccount

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());
}
Also used : ReportingPeriod(name.abuchen.portfolio.snapshot.ReportingPeriod) GroupEarningsByAccount(name.abuchen.portfolio.snapshot.GroupEarningsByAccount) Client(name.abuchen.portfolio.model.Client) CurrencyConverterImpl(name.abuchen.portfolio.money.CurrencyConverterImpl) CurrencyConverter(name.abuchen.portfolio.money.CurrencyConverter) ClientPerformanceSnapshot(name.abuchen.portfolio.snapshot.ClientPerformanceSnapshot)

Aggregations

Client (name.abuchen.portfolio.model.Client)1 CurrencyConverter (name.abuchen.portfolio.money.CurrencyConverter)1 CurrencyConverterImpl (name.abuchen.portfolio.money.CurrencyConverterImpl)1 ClientPerformanceSnapshot (name.abuchen.portfolio.snapshot.ClientPerformanceSnapshot)1 GroupEarningsByAccount (name.abuchen.portfolio.snapshot.GroupEarningsByAccount)1 ReportingPeriod (name.abuchen.portfolio.snapshot.ReportingPeriod)1