/** * Removes the given data generator from this listing. If this listing does * not have the generator, does nothing. * * @param generator * the data generator to remove, not null */ protected void removeDataGenerator(DataGenerator<T> generator) { getDataCommunicator().removeDataGenerator(generator); }
/** * Adds the given data generator to this listing. If the generator was * already added, does nothing. * * @param generator * the data generator to add, not null */ protected void addDataGenerator(DataGenerator<T> generator) { getDataCommunicator().addDataGenerator(generator); }
protected <F> SerializableConsumer<F> internalSetDataProvider( DataProvider<T, F> dataProvider, F initialFilter) { return getDataCommunicator().setDataProvider(dataProvider, initialFilter); }
/** * Sets the item caption generator that is used to produce the strings shown * in the combo box for each item. By default, * {@link String#valueOf(Object)} is used. * * @param itemCaptionGenerator * the item caption provider to use, not null */ protected void setItemCaptionGenerator( ItemCaptionGenerator<T> itemCaptionGenerator) { Objects.requireNonNull(itemCaptionGenerator, "Item caption generators must not be null"); this.itemCaptionGenerator = itemCaptionGenerator; getDataCommunicator().reset(); }
protected DataProvider<T, ?> internalGetDataProvider() { return getDataCommunicator().getDataProvider(); }
/** * Sets the item icon generator that is used to produce custom icons for * shown items. The generator can return null for items with no icon. * <p> * Implementations that support item icons make this method public. * * @see IconGenerator * * @param itemIconGenerator * the item icon generator to set, not null * @throws NullPointerException * if {@code itemIconGenerator} is {@code null} */ protected void setItemIconGenerator(IconGenerator<T> itemIconGenerator) { Objects.requireNonNull(itemIconGenerator, "Item icon generator must not be null"); this.itemIconGenerator = itemIconGenerator; getDataCommunicator().reset(); }
/** * A helper method for refreshing the client-side representation of a * single data item. * * @param item * the item to refresh */ protected void refresh(T item) { getParent().getDataCommunicator().refresh(item); }
/** * Gets a data object based on its client-side identifier key. * * @param key * key for data object * @return the data object */ protected T getData(String key) { return getParent().getDataCommunicator().getKeyMapper().get(key); }