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);
}
}
Aggregations