use of net.sourceforge.nattable.selection.event.RowSelectionEvent in project translationstudio8 by heartsome.
the class SplitSegmentOperation method refreshNatTable.
private void refreshNatTable() {
SelectionLayer selectionLayer = LayerUtil.getLayer(xliffEditor.getTable(), SelectionLayer.class);
int rowPosition = selectionLayer.getRowPositionByIndex(rowIndex);
selectionLayer.fireLayerEvent(new RowSelectionEvent(selectionLayer, Arrays.asList(new Integer[] { rowPosition, rowPosition + 1 })));
xliffEditor.autoResizeNotColumn();
ActiveCellRegion.setActiveCellRegion(null);
}
use of net.sourceforge.nattable.selection.event.RowSelectionEvent in project translationstudio8 by heartsome.
the class SelectRowCommandHandler method selectRows.
protected void selectRows(int columnPosition, Collection<Integer> rowPositions, boolean withShiftMask, boolean withControlMask) {
Set<Range> changedRowRanges = new HashSet<Range>();
for (int rowPosition : rowPositions) {
changedRowRanges.addAll(internalSelectRow(columnPosition, rowPosition, withShiftMask, withControlMask));
}
Set<Integer> changedRows = new HashSet<Integer>();
for (Range range : changedRowRanges) {
for (int i = range.start; i < range.end; i++) {
changedRows.add(Integer.valueOf(i));
}
}
selectionLayer.fireLayerEvent(new RowSelectionEvent(selectionLayer, changedRows));
}
Aggregations