Search in sources :

Example 6 with ExchangeRate

use of jgnash.engine.ExchangeRate in project jgnash by ccavanaugh.

the class CurrencyExchangeDialog method updateModel.

private void updateModel() {
    CurrencyNode base = baseCurrencyCombo.getSelectedNode();
    CurrencyNode exchange = exchangeCurrencyCombo.getSelectedNode();
    if (base != null && exchange != null) {
        ExchangeRate rate = getEngine().getExchangeRate(base, exchange);
        model.setExchangeRate(rate);
    }
}
Also used : CurrencyNode(jgnash.engine.CurrencyNode) ExchangeRate(jgnash.engine.ExchangeRate)

Aggregations

ExchangeRate (jgnash.engine.ExchangeRate)6 ExecutionException (java.util.concurrent.ExecutionException)2 CriteriaBuilder (javax.persistence.criteria.CriteriaBuilder)2 Engine (jgnash.engine.Engine)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Account (jgnash.engine.Account)1 CommodityNode (jgnash.engine.CommodityNode)1 Config (jgnash.engine.Config)1 CurrencyNode (jgnash.engine.CurrencyNode)1 ExchangeRateHistoryNode (jgnash.engine.ExchangeRateHistoryNode)1 StoredObject (jgnash.engine.StoredObject)1 Transaction (jgnash.engine.Transaction)1 Budget (jgnash.engine.budget.Budget)1 Reminder (jgnash.engine.recurring.Reminder)1