Search in sources :

Example 26 with TestLayer

use of org.eclipse.nebula.widgets.nattable.test.fixture.TestLayer in project nebula.widgets.nattable by eclipse.

the class FreezeLayerTest2 method testFreezeAll.

@Test
public void testFreezeAll() {
    this.freezeLayer.setTopLeftPosition(0, 0);
    this.freezeLayer.setBottomRightPosition(3, 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 | B0 | C0 | D0 \n" + "A1 | B1 | C1 | D1 \n" + "A2 | B2 | C2 | D2 \n" + "A3 | B3 | C3 | D3 \n");
    LayerAssert.assertLayerEquals(expectedLayer, this.freezeLayer);
}
Also used : TestLayer(org.eclipse.nebula.widgets.nattable.test.fixture.TestLayer) Test(org.junit.Test)

Example 27 with TestLayer

use of org.eclipse.nebula.widgets.nattable.test.fixture.TestLayer in project nebula.widgets.nattable by eclipse.

the class FreezeLayerTest2 method setup.

@Before
public void setup() {
    TestLayer dataLayer = 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 | B0 | C0 | D0 \n" + "A1 | B1 | C1 | D1 \n" + "A2 | B2 | C2 | D2 \n" + "A3 | B3 | C3 | D3 \n");
    this.freezeLayer = new FreezeLayer(dataLayer);
}
Also used : FreezeLayer(org.eclipse.nebula.widgets.nattable.freeze.FreezeLayer) TestLayer(org.eclipse.nebula.widgets.nattable.test.fixture.TestLayer) Before(org.junit.Before)

Example 28 with TestLayer

use of org.eclipse.nebula.widgets.nattable.test.fixture.TestLayer in project nebula.widgets.nattable by eclipse.

the class FreezeLayerTest2 method testFreezeMiddle.

@Test
public void testFreezeMiddle() {
    this.freezeLayer.setTopLeftPosition(1, 1);
    this.freezeLayer.setBottomRightPosition(2, 2);
    TestLayer expectedLayer = new TestLayer(2, 2, "1:1;100 | 2:2;100", "1:1;40  | 2:2;40", "B1 | C1 \n" + "B2 | C2 \n");
    LayerAssert.assertLayerEquals(expectedLayer, this.freezeLayer);
}
Also used : TestLayer(org.eclipse.nebula.widgets.nattable.test.fixture.TestLayer) Test(org.junit.Test)

Example 29 with TestLayer

use of org.eclipse.nebula.widgets.nattable.test.fixture.TestLayer in project nebula.widgets.nattable by eclipse.

the class FreezeLayerTest2 method testFreezeEnd.

@Test
public void testFreezeEnd() {
    this.freezeLayer.setTopLeftPosition(1, 1);
    this.freezeLayer.setBottomRightPosition(3, 3);
    TestLayer expectedLayer = new TestLayer(3, 3, "1:1;100 | 2:2;100 | 3:3;100", "1:1;40  | 2:2;40  | 3:3;40", "B1 | C1 | D1 \n" + "B2 | C2 | D2 \n" + "B3 | C3 | D3 \n");
    LayerAssert.assertLayerEquals(expectedLayer, this.freezeLayer);
}
Also used : TestLayer(org.eclipse.nebula.widgets.nattable.test.fixture.TestLayer) Test(org.junit.Test)

Example 30 with TestLayer

use of org.eclipse.nebula.widgets.nattable.test.fixture.TestLayer in project nebula.widgets.nattable by eclipse.

the class ColumnHideShowLayerTest2 method setup.

@Before
public void setup() {
    TestLayer dataLayer = 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 | B0 | C0 | D0 \n" + "A1 | B1 | C1 | D1 \n" + "A2 | B2 | C2 | D2 \n" + "A3 | B3 | C3 | D3 \n");
    this.hideShowLayer = new ColumnHideShowLayer(dataLayer);
}
Also used : TestLayer(org.eclipse.nebula.widgets.nattable.test.fixture.TestLayer) ColumnHideShowLayer(org.eclipse.nebula.widgets.nattable.hideshow.ColumnHideShowLayer) Before(org.junit.Before)

Aggregations

TestLayer (org.eclipse.nebula.widgets.nattable.test.fixture.TestLayer)36 Test (org.junit.Test)26 FreezeColumnCommand (org.eclipse.nebula.widgets.nattable.freeze.command.FreezeColumnCommand)15 Before (org.junit.Before)10 IClientAreaProvider (org.eclipse.nebula.widgets.nattable.util.IClientAreaProvider)3 Rectangle (org.eclipse.swt.graphics.Rectangle)3 FreezeLayer (org.eclipse.nebula.widgets.nattable.freeze.FreezeLayer)2 FreezeSelectionCommand (org.eclipse.nebula.widgets.nattable.freeze.command.FreezeSelectionCommand)2 ColumnHideShowLayer (org.eclipse.nebula.widgets.nattable.hideshow.ColumnHideShowLayer)2 ViewportLayer (org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer)2 CompositeFreezeLayer (org.eclipse.nebula.widgets.nattable.freeze.CompositeFreezeLayer)1 ColumnReorderLayer (org.eclipse.nebula.widgets.nattable.reorder.ColumnReorderLayer)1 SelectionLayer (org.eclipse.nebula.widgets.nattable.selection.SelectionLayer)1 InitializeClientAreaCommandFixture (org.eclipse.nebula.widgets.nattable.test.fixture.InitializeClientAreaCommandFixture)1