/** * Constructs a new TwinColSelect with caption and the given options. * * @param caption * the caption to set, can be {@code null} * @param options * the options, cannot be {@code null} */ public TwinColSelect(String caption, Collection<T> options) { this(caption, DataProvider.ofCollection(options)); }
/** * Creates a new {@code Grid} using the given caption and collection of * items. * * @param caption * the caption of the grid * @param items * the data items to use, not {@çode null} */ public Grid(String caption, Collection<T> items) { this(caption, DataProvider.ofCollection(items)); }
/** * Constructs a new ListSelect with caption and the given options. * * @param caption * the caption to set, can be {@code null} * @param options * the options, cannot be {@code null} */ public ListSelect(String caption, Collection<T> options) { this(caption, DataProvider.ofCollection(options)); }
/** * Constructs a new CheckBoxGroup with caption and DataProvider containing * given items. * * @param caption * the caption text * @param items * the data items to use, not null * @see #setItems(Collection) */ public CheckBoxGroup(String caption, Collection<T> items) { this(caption, DataProvider.ofCollection(items)); }
/** * Constructs a new RadioButtonGroup with caption and DataProvider * containing given items. * * @param caption * the caption text * @param items * the data items to use, not null * @see #setItems(Collection) */ public RadioButtonGroup(String caption, Collection<T> items) { this(caption, DataProvider.ofCollection(items)); }
/** * {@inheritDoc} * <p> * Filtering will use a case insensitive match to show all items where the * filter text is a substring of the caption displayed for that item. */ @Override public void setItems(Collection<T> items) { ListDataProvider<T> listDataProvider = DataProvider.ofCollection(items); setDataProvider(listDataProvider); }
@Override public default void setItems(Collection<T> items) { setDataProvider(DataProvider.ofCollection(items)); }
/** * Sets the data items of this listing and a simple string filter with which * the item string and the text the user has input are compared. * <p> * Note that unlike {@link #setItems(Collection)}, no automatic case * conversion is performed before the comparison. * * @param captionFilter * filter to check if an item is shown when user typed some text * into the ComboBox * @param items * the data items to display * @since 8.0 */ public void setItems(CaptionFilter captionFilter, Collection<T> items) { ListDataProvider<T> listDataProvider = DataProvider.ofCollection(items); setDataProvider(captionFilter, listDataProvider); }