use of com.vaadin.data.Container.Filterable in project VaadinUtils by rlsutton1.
the class TwinColumnSearchableSelect method createAvailableTable.
private void createAvailableTable() {
availableTable = new SearchableSelectableEntityTable<C>(this.getClass().getSimpleName()) {
private static final long serialVersionUID = 1L;
@Override
public HeadingPropertySet getHeadingPropertySet() {
return new HeadingPropertySet.Builder<C>().addColumn(availableColumnHeader, itemLabel).build();
}
@Override
public Filterable getContainer() {
return availableContainer;
}
@Override
protected Filter getContainerFilter(String filterString, boolean advancedSearchActive) {
Filter searchFilter = null;
if (filterString != null && filterString.length() > 0) {
searchFilter = getSearchFilter(filterString);
}
return NullFilter.and(baselineFilter, selectedFilter, searchFilter);
}
@Override
protected String getTitle() {
return "";
}
};
availableTable.addItemClickListener(new ItemClickListener() {
private static final long serialVersionUID = 1L;
@Override
public void itemClick(ItemClickEvent event) {
if (event.isDoubleClick()) {
addButton.click();
}
}
});
availableTable.disableSelectable();
availableTable.setWidth(200, Unit.PIXELS);
availableTable.setHeight(300, Unit.PIXELS);
}
Aggregations