use of org.eclipse.nebula.widgets.nattable.freeze.command.FreezeColumnCommand in project nebula.widgets.nattable by eclipse.
the class CompositeFreezeLayerTest method testReorderNonFrozenColumnToMiddleOfFrozenArea.
// Reorder
@Test
public void testReorderNonFrozenColumnToMiddleOfFrozenArea() {
this.compositeFreezeLayer.doCommand(new FreezeColumnCommand(this.compositeFreezeLayer, 1));
this.reorderLayer.reorderColumnPosition(3, 1);
TestLayer expectedLayer = new TestLayer(4, 4, "0:0;100 | 3:1;100 | 1:2;100 | 2:0;100", "0:0;40 | 1:1;40 | 2:2;40 | 3:3;40", "A0~:FROZEN_COLUMN_REGION | D0~:FROZEN_COLUMN_REGION | B0~:FROZEN_COLUMN_REGION | C0~:NONFROZEN_REGION \n" + "A1~:FROZEN_COLUMN_REGION | D1~:FROZEN_COLUMN_REGION | B1~:FROZEN_COLUMN_REGION | C1~:NONFROZEN_REGION \n" + "A2~:FROZEN_COLUMN_REGION | D2~:FROZEN_COLUMN_REGION | B2~:FROZEN_COLUMN_REGION | C2~:NONFROZEN_REGION \n" + "A3~:FROZEN_COLUMN_REGION | D3~:FROZEN_COLUMN_REGION | B3~:FROZEN_COLUMN_REGION | C3~:NONFROZEN_REGION \n");
LayerAssert.assertLayerEquals(expectedLayer, this.compositeFreezeLayer);
}
use of org.eclipse.nebula.widgets.nattable.freeze.command.FreezeColumnCommand in project nebula.widgets.nattable by eclipse.
the class CompositeFreezeLayerTest method testReorderEndFrozenColumnToMiddleOfFrozenArea.
@Test
public void testReorderEndFrozenColumnToMiddleOfFrozenArea() {
this.compositeFreezeLayer.doCommand(new FreezeColumnCommand(this.compositeFreezeLayer, 2));
this.reorderLayer.reorderColumnPosition(2, 1);
TestLayer expectedLayer = new TestLayer(4, 4, "0:0;100 | 2:1;100 | 1:2;100 | 3:0;100", "0:0;40 | 1:1;40 | 2:2;40 | 3:3;40", "A0~:FROZEN_COLUMN_REGION | C0~:FROZEN_COLUMN_REGION | B0~:FROZEN_COLUMN_REGION | D0~:NONFROZEN_REGION \n" + "A1~:FROZEN_COLUMN_REGION | C1~:FROZEN_COLUMN_REGION | B1~:FROZEN_COLUMN_REGION | D1~:NONFROZEN_REGION \n" + "A2~:FROZEN_COLUMN_REGION | C2~:FROZEN_COLUMN_REGION | B2~:FROZEN_COLUMN_REGION | D2~:NONFROZEN_REGION \n" + "A3~:FROZEN_COLUMN_REGION | C3~:FROZEN_COLUMN_REGION | B3~:FROZEN_COLUMN_REGION | D3~:NONFROZEN_REGION \n");
LayerAssert.assertLayerEquals(expectedLayer, this.compositeFreezeLayer);
}
use of org.eclipse.nebula.widgets.nattable.freeze.command.FreezeColumnCommand in project nebula.widgets.nattable by eclipse.
the class CompositeFreezeLayerTest method testHideBeginningFrozenColumn.
@Test
public void testHideBeginningFrozenColumn() {
this.compositeFreezeLayer.doCommand(new FreezeColumnCommand(this.compositeFreezeLayer, 2));
this.hideShowLayer.hideColumnPositions(Arrays.asList(new Integer[] { 0 }));
TestLayer expectedLayer = new TestLayer(3, 4, "1:0;100 | 2:1;100 | 3:0;100", "0:0;40 | 1:1;40 | 2:2;40 | 3:3;40", "B0~:FROZEN_COLUMN_REGION | C0~:FROZEN_COLUMN_REGION | D0~:NONFROZEN_REGION \n" + "B1~:FROZEN_COLUMN_REGION | C1~:FROZEN_COLUMN_REGION | D1~:NONFROZEN_REGION \n" + "B2~:FROZEN_COLUMN_REGION | C2~:FROZEN_COLUMN_REGION | D2~:NONFROZEN_REGION \n" + "B3~:FROZEN_COLUMN_REGION | C3~:FROZEN_COLUMN_REGION | D3~:NONFROZEN_REGION \n");
LayerAssert.assertLayerEquals(expectedLayer, this.compositeFreezeLayer);
}
use of org.eclipse.nebula.widgets.nattable.freeze.command.FreezeColumnCommand in project nebula.widgets.nattable by eclipse.
the class CompositeFreezeLayerTest method testReorderNonFrozenColumnToEndOfFrozenArea.
@Test
public void testReorderNonFrozenColumnToEndOfFrozenArea() {
this.compositeFreezeLayer.doCommand(new FreezeColumnCommand(this.compositeFreezeLayer, 1));
this.reorderLayer.reorderColumnPosition(3, 2);
TestLayer expectedLayer = new TestLayer(4, 4, "0:0;100 | 1:1;100 | 3:0;100 | 2:1;100", "0:0;40 | 1:1;40 | 2:2;40 | 3:3;40", "A0~:FROZEN_COLUMN_REGION | B0~:FROZEN_COLUMN_REGION | D0~:NONFROZEN_REGION | C0~:NONFROZEN_REGION \n" + "A1~:FROZEN_COLUMN_REGION | B1~:FROZEN_COLUMN_REGION | D1~:NONFROZEN_REGION | C1~:NONFROZEN_REGION \n" + "A2~:FROZEN_COLUMN_REGION | B2~:FROZEN_COLUMN_REGION | D2~:NONFROZEN_REGION | C2~:NONFROZEN_REGION \n" + "A3~:FROZEN_COLUMN_REGION | B3~:FROZEN_COLUMN_REGION | D3~:NONFROZEN_REGION | C3~:NONFROZEN_REGION \n");
LayerAssert.assertLayerEquals(expectedLayer, this.compositeFreezeLayer);
}
use of org.eclipse.nebula.widgets.nattable.freeze.command.FreezeColumnCommand in project nebula.widgets.nattable by eclipse.
the class CompositeFreezeLayerTest method testFreezeAllColumns.
// Freeze column
@Test
public void testFreezeAllColumns() {
this.compositeFreezeLayer.doCommand(new FreezeColumnCommand(this.compositeFreezeLayer, 3));
TestLayer expectedLayer = new TestLayer(4, 4, "0:0;100 | 1:1;100 | 2:2;100 | 3:3;100", "0:0;40 | 1:1;40 | 2:2;40 | 3:3;40", "A0~:FROZEN_COLUMN_REGION | B0~:FROZEN_COLUMN_REGION | C0~:FROZEN_COLUMN_REGION | D0~:FROZEN_COLUMN_REGION \n" + "A1~:FROZEN_COLUMN_REGION | B1~:FROZEN_COLUMN_REGION | C1~:FROZEN_COLUMN_REGION | D1~:FROZEN_COLUMN_REGION \n" + "A2~:FROZEN_COLUMN_REGION | B2~:FROZEN_COLUMN_REGION | C2~:FROZEN_COLUMN_REGION | D2~:FROZEN_COLUMN_REGION \n" + "A3~:FROZEN_COLUMN_REGION | B3~:FROZEN_COLUMN_REGION | C3~:FROZEN_COLUMN_REGION | D3~:FROZEN_COLUMN_REGION \n");
LayerAssert.assertLayerEquals(expectedLayer, this.compositeFreezeLayer);
}
Aggregations