use of jgnash.ui.register.table.SortedTableModel in project jgnash by ccavanaugh.
the class RegisterFactory method getTableModel.
private static AbstractRegisterTableModel getTableModel(final boolean sort, final Account account, final boolean detailSplits) {
AbstractRegisterTableModel model;
if (account.memberOf(AccountGroup.INVEST) && (account.getAccountType() != AccountType.SIMPLEINVEST)) {
if (sort) {
return new SortedInvestmentTableModel(account);
}
return new InvestmentRegisterTableModel(account);
}
// reference to the correct column names
String[] names = getColumnNames(account);
if (sort) {
model = new SortedTableModel(account, names);
} else {
model = new RegisterTableWithSplitEntriesModel(account, names, detailSplits);
}
return model;
}
Aggregations