@Test public void select_singleItemSignature_sendToClientSide() { grid.setSelectionMode(SelectionMode.MULTI); grid.setItems("foo", "bar"); grid.select("foo"); Assert.assertEquals(1, selected.size()); Assert.assertEquals("foo", selected.iterator().next()); }
@Override public void select(T item) { if (isSelected(item)) { return; } Set<T> selected = new HashSet<>(); if (item != null) { selected.add(item); } doUpdateSelection(selected, Collections.emptySet(), false); }
AbstractGridMultiSelectionModel extends AbstractGridExtension<T> implements GridMultiSelectionModel<T> { @Override public void select(T item) { if (isSelected(item)) { return; } Set<T> selected = new HashSet<>(); if (item != null) { selected.add(item); } doUpdateSelection(selected, Collections.emptySet(), false); } }
AbstractGridMultiSelectionModel extends AbstractGridExtension<T> implements GridMultiSelectionModel<T> { @Override public void select(T item) { if (isSelected(item)) { return; } Set<T> selected = new HashSet<>(); if (item != null) { selected.add(item); } doUpdateSelection(selected, Collections.emptySet(), false); } AbstractGridMultiSelectionModel(Grid<T> grid); }
AbstractGridMultiSelectionModel extends AbstractGridExtension<T> implements GridMultiSelectionModel<T> { @Override public void select(T item) { if (isSelected(item)) { return; } Set<T> selected = new HashSet<>(); if (item != null) { selected.add(item); } doUpdateSelection(selected, Collections.emptySet(), false); } AbstractGridMultiSelectionModel(Grid<T> grid); @Override void selectFromClient(T item); @Override void deselectFromClient(T item); @Override Set<T> getSelectedItems(); @Override Optional<T> getFirstSelectedItem(); @Override void select(T item); @Override void deselect(T item); @Override void selectAll(); @Override void deselectAll(); @Override void updateSelection(Set<T> addedItems, Set<T> removedItems); @Override boolean isSelected(T item); @Override MultiSelect<Grid<T>, T> asMultiSelect(); @SuppressWarnings({ "unchecked", "rawtypes" }) @Override Registration addSelectionListener(
            SelectionListener<Grid<T>, T> listener); @SuppressWarnings({ "unchecked", "rawtypes" }) @Override Registration addMultiSelectionListener(
            MultiSelectionListener<Grid<T>, T> listener); @Override void setSelectAllCheckboxVisibility(
            SelectAllCheckboxVisibility selectAllCheckBoxVisibility); @Override SelectAllCheckboxVisibility getSelectAllCheckboxVisibility(); @Override boolean isSelectAllCheckboxVisible(); @Override void generateData(T item, JsonObject jsonObject); @Override void setSelectionColumnFrozen(boolean frozen); @Override boolean isSelectionColumnFrozen(); }
AbstractGridMultiSelectionModel extends AbstractGridExtension<T> implements GridMultiSelectionModel<T> { @Override public void select(T item) { if (isSelected(item)) { return; } Set<T> selected = new HashSet<>(); if (item != null) { selected.add(item); } doUpdateSelection(selected, Collections.emptySet(), false); } AbstractGridMultiSelectionModel(Grid<T> grid); @Override void selectFromClient(T item); @Override void deselectFromClient(T item); @Override Set<T> getSelectedItems(); @Override Optional<T> getFirstSelectedItem(); @Override void select(T item); @Override void deselect(T item); @Override void selectAll(); @Override void deselectAll(); @Override void updateSelection(Set<T> addedItems, Set<T> removedItems); @Override boolean isSelected(T item); @Override MultiSelect<Grid<T>, T> asMultiSelect(); @SuppressWarnings({ "unchecked", "rawtypes" }) @Override Registration addSelectionListener(
            SelectionListener<Grid<T>, T> listener); @SuppressWarnings({ "unchecked", "rawtypes" }) @Override Registration addMultiSelectionListener(
            MultiSelectionListener<Grid<T>, T> listener); @Override void setSelectAllCheckboxVisibility(
            SelectAllCheckboxVisibility selectAllCheckBoxVisibility); @Override SelectAllCheckboxVisibility getSelectAllCheckboxVisibility(); @Override boolean isSelectAllCheckboxVisible(); @Override void generateData(T item, JsonObject jsonObject); @Override void setSelectionColumnFrozen(boolean frozen); @Override boolean isSelectionColumnFrozen();  }