use of org.eclipse.nebula.widgets.nattable.selection.SelectColumnCommandHandler in project nebula.widgets.nattable by eclipse.
the class HideSelectedColumnsTest method shouldHideAllSelectedColumns.
@Test
public void shouldHideAllSelectedColumns() {
// Select cells and columns
new SelectColumnCommandHandler(this.selectionLayer).selectColumn(2, 0, false, true);
this.selectionLayer.selectCell(1, 0, false, true);
this.selectionLayer.selectCell(4, 4, false, true);
// Hide selection
this.selectionLayer.doCommand(new MultiColumnHideCommand(this.selectionLayer, new int[] { 2, 0, 4 }));
// Previously selected columns should be hidden
Assert.assertTrue(this.columnHideShowLayer.isColumnIndexHidden(2));
Assert.assertTrue(this.columnHideShowLayer.isColumnIndexHidden(0));
Assert.assertTrue(this.columnHideShowLayer.isColumnIndexHidden(4));
}
use of org.eclipse.nebula.widgets.nattable.selection.SelectColumnCommandHandler in project nebula.widgets.nattable by eclipse.
the class HideSelectedColumnsTest method shouldHideSelectedColumn.
@Test
public void shouldHideSelectedColumn() {
// Select column to hide
new SelectColumnCommandHandler(this.selectionLayer).selectColumn(2, 0, false, false);
// Hide column
this.selectionLayer.doCommand(new MultiColumnHideCommand(this.selectionLayer, 2));
// The previously selected column should be hidden
Assert.assertTrue(this.columnHideShowLayer.isColumnIndexHidden(2));
Assert.assertEquals(4, this.selectionLayer.getColumnCount());
}
Aggregations