Search in sources :

Example 16 with AccountType

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

the class TransactionDialog method buildTabs.

private void buildTabs() {
    final AccountType accountType = accountProperty().get().getAccountType();
    final String[] tabNames = RegisterFactory.getCreditDebitTabNames(accountType);
    creditTab = buildTab(tabNames[0], SlipType.INCREASE);
    debitTab = buildTab(tabNames[1], SlipType.DECREASE);
    tabPane.getTabs().addAll(creditTab, debitTab);
    if (accountType == AccountType.CHECKING || accountType == AccountType.CREDIT) {
        tabPane.getSelectionModel().select(debitTab);
    } else if (accountType.getAccountGroup() == AccountGroup.INCOME) {
        tabPane.getSelectionModel().select(debitTab);
    }
}
Also used : AccountType(jgnash.engine.AccountType)

Aggregations

AccountType (jgnash.engine.AccountType)16 Account (jgnash.engine.Account)10 BigDecimal (java.math.BigDecimal)8 LocalDate (java.time.LocalDate)7 Engine (jgnash.engine.Engine)7 ResourceBundle (java.util.ResourceBundle)4 CurrencyNode (jgnash.engine.CurrencyNode)4 DateUtils (jgnash.time.DateUtils)4 DateTimeFormatter (java.time.format.DateTimeFormatter)3 ArrayList (java.util.ArrayList)3 Collection (java.util.Collection)3 Iterator (java.util.Iterator)3 List (java.util.List)3 Objects (java.util.Objects)3 Set (java.util.Set)3 Collectors (java.util.stream.Collectors)3 AccountGroup (jgnash.engine.AccountGroup)3 EngineFactory (jgnash.engine.EngineFactory)3 DefaultFormBuilder (com.jgoodies.forms.builder.DefaultFormBuilder)2 FormLayout (com.jgoodies.forms.layout.FormLayout)2