use of org.phoenicis.javafx.views.mainwindow.engines.EnginesFilter in project POL-POM-5 by PlayOnLinux.
the class EngineSubCategoryPanelSkin method createFilteredEngineVersions.
/**
* Creates a {@link FilteredList} object of the engine versions by applying the {@link EnginesFilter} known to the
* control
*
* @return A filtered list of the engine versions
*/
private ObservableList<EngineVersionDTO> createFilteredEngineVersions() {
final EnginesFilter filter = getControl().getFilter();
final EngineCategoryDTO engineCategory = getControl().getEngineCategory();
final EngineSubCategoryDTO engineSubCategory = getControl().getEngineSubCategory();
final FilteredList<EngineVersionDTO> filteredEngineVersions = FXCollections.observableArrayList(engineSubCategory.getPackages()).sorted(EngineSubCategoryDTO.comparator().reversed()).filtered(filter.createFilter(engineCategory, engineSubCategory));
filteredEngineVersions.predicateProperty().bind(Bindings.createObjectBinding(() -> filter.createFilter(engineCategory, engineSubCategory), filter.searchTermProperty(), filter.selectedEngineCategoryProperty(), filter.showInstalledProperty(), filter.showNotInstalledProperty()));
return filteredEngineVersions;
}
Aggregations