Search in sources :

Example 1 with ReconciledPredicate

use of jgnash.util.function.ReconciledPredicate in project jgnash by ccavanaugh.

the class RegisterTableController method handleFilterChange.

private void handleFilterChange() {
    Predicate<Transaction> predicate = new ReconciledPredicate(account.get(), reconciledStateFilterComboBox.valueProperty().get().getReconciledState()).and(new TransactionAgePredicate(transactionAgeFilterComboBox.valueProperty().get().getChronoUnit(), transactionAgeFilterComboBox.valueProperty().get().getAge()));
    if (memoFilterTextField != null) {
        predicate = predicate.and(new MemoPredicate(memoFilterTextField.getText(), Options.regexForFiltersProperty().get()));
    }
    if (payeeFilterTextField != null) {
        predicate = predicate.and(new PayeePredicate(payeeFilterTextField.getText(), Options.regexForFiltersProperty().get()));
    }
    filteredTransactionList.setPredicate(predicate);
}
Also used : ReconciledPredicate(jgnash.util.function.ReconciledPredicate) Transaction(jgnash.engine.Transaction) InvestmentTransaction(jgnash.engine.InvestmentTransaction) TransactionAgePredicate(jgnash.util.function.TransactionAgePredicate) PayeePredicate(jgnash.util.function.PayeePredicate) MemoPredicate(jgnash.util.function.MemoPredicate)

Aggregations

InvestmentTransaction (jgnash.engine.InvestmentTransaction)1 Transaction (jgnash.engine.Transaction)1 MemoPredicate (jgnash.util.function.MemoPredicate)1 PayeePredicate (jgnash.util.function.PayeePredicate)1 ReconciledPredicate (jgnash.util.function.ReconciledPredicate)1 TransactionAgePredicate (jgnash.util.function.TransactionAgePredicate)1