Example usage for javafx.collections ObservableList filtered

List of usage examples for javafx.collections ObservableList filtered

Introduction

In this page you can find the example usage for javafx.collections ObservableList filtered.

Prototype

public default FilteredList<E> filtered(Predicate<E> predicate) 

Source Link

Document

Creates a FilteredList wrapper of this list using the specified predicate.

Usage

From source file:at.ac.tuwien.qse.sepm.gui.controller.impl.SlideshowOrganizerImpl.java

public void setSlideshows(ObservableList<Slideshow> slideshows) {
    // only display real slideshows (no placeholder)
    if (slideshows == null) {
        slideshowList.setItems(null);/*from   w  ww . java  2 s.  co  m*/
        return;
    }

    FilteredList<Slideshow> filtered = slideshows.filtered(s -> s.getId() >= 0);
    slideshowList.setItems(filtered);
}