Search in sources :

Example 1 with EnginesFilter

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;
}
Also used : EngineCategoryDTO(org.phoenicis.engines.dto.EngineCategoryDTO) EngineVersionDTO(org.phoenicis.engines.dto.EngineVersionDTO) EnginesFilter(org.phoenicis.javafx.views.mainwindow.engines.EnginesFilter) EngineSubCategoryDTO(org.phoenicis.engines.dto.EngineSubCategoryDTO)

Aggregations

EngineCategoryDTO (org.phoenicis.engines.dto.EngineCategoryDTO)1 EngineSubCategoryDTO (org.phoenicis.engines.dto.EngineSubCategoryDTO)1 EngineVersionDTO (org.phoenicis.engines.dto.EngineVersionDTO)1 EnginesFilter (org.phoenicis.javafx.views.mainwindow.engines.EnginesFilter)1