List of usage examples for com.google.gwt.gen2.table.event.client RowSelectionEvent getDeselectedRows
public Set<Row> getDeselectedRows()
From source file:org.apache.hupa.widgets.ui.RefetchPagingScrollTable.java
License:Apache License
public RefetchPagingScrollTable(MutableTableModel<RowType> tableModel, FixedWidthGrid dataTable, FixedWidthFlexTable headerTable, TableDefinition<RowType> tableDefinition) { super(tableModel, dataTable, headerTable, tableDefinition); getDataTable().addRowSelectionHandler(new RowSelectionHandler() { public void onRowSelection(RowSelectionEvent event) { Iterator<Row> rowIndexIt = event.getSelectedRows().iterator(); while (rowIndexIt.hasNext()) { RowType row = getRowValue(rowIndexIt.next().getRowIndex()); if (selectedRows.contains(row) == false) { selectedRows.add(row); }/*from w w w. ja v a 2 s. c om*/ } Iterator<Row> rowDeselectIndexIt = event.getDeselectedRows().iterator(); while (rowDeselectIndexIt.hasNext()) { RowType row = getRowValue(rowDeselectIndexIt.next().getRowIndex()); selectedRows.remove(row); } } }); }