Search in sources :

Example 1 with LibrarySidebarToggleGroup

use of org.phoenicis.javafx.components.library.control.LibrarySidebarToggleGroup in project POL-POM-5 by PlayOnLinux.

the class LibrarySidebarSkin method createSidebarToggleGroup.

/**
 * Creates the {@link LibrarySidebarToggleGroup} which contains all known shortcut categories
 */
private LibrarySidebarToggleGroup createSidebarToggleGroup() {
    final FilteredList<ShortcutCategoryDTO> filteredShortcutCategories = getControl().getItems().filtered(getControl().getFilter()::filter);
    filteredShortcutCategories.predicateProperty().bind(Bindings.createObjectBinding(() -> getControl().getFilter()::filter, getControl().searchTermProperty()));
    final LibrarySidebarToggleGroup categoryView = new LibrarySidebarToggleGroup(tr("Categories"), filteredShortcutCategories);
    getControl().selectedShortcutCategoryProperty().bind(categoryView.selectedElementProperty());
    return categoryView;
}
Also used : LibrarySidebarToggleGroup(org.phoenicis.javafx.components.library.control.LibrarySidebarToggleGroup) ShortcutCategoryDTO(org.phoenicis.library.dto.ShortcutCategoryDTO)

Aggregations

LibrarySidebarToggleGroup (org.phoenicis.javafx.components.library.control.LibrarySidebarToggleGroup)1 ShortcutCategoryDTO (org.phoenicis.library.dto.ShortcutCategoryDTO)1