Search in sources :

Example 31 with TestLayer

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

the class ColumnHideShowLayerTest2 method hideLastColumn.

@Test
public void hideLastColumn() throws Exception {
    this.hideShowLayer.hideColumnPositions(Arrays.asList(new Integer[] { 3 }));
    TestLayer expectedLayer = new TestLayer(3, 4, "0:0;100 | 1:1;100 | 2:2;100", "0:0;40  | 1:1;40  | 2:2;40 | 3:3;40", "A0 | B0 | C0 \n" + "A1 | B1 | C1 \n" + "A2 | B2 | C2 \n" + "A3 | B3 | C3 \n");
    LayerAssert.assertLayerEquals(expectedLayer, this.hideShowLayer);
}
Also used : TestLayer(org.eclipse.nebula.widgets.nattable.test.fixture.TestLayer) Test(org.junit.Test)

Example 32 with TestLayer

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

the class ColumnReorderLayerTest2 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.reorderLayer = new ColumnReorderLayer(dataLayer);
}
Also used : TestLayer(org.eclipse.nebula.widgets.nattable.test.fixture.TestLayer) Before(org.junit.Before)

Example 33 with TestLayer

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

the class RowReorderLayerTest2 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.reorderLayer = new RowReorderLayer(dataLayer);
}
Also used : TestLayer(org.eclipse.nebula.widgets.nattable.test.fixture.TestLayer) Before(org.junit.Before)

Example 34 with TestLayer

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

the class MarkerSelectionModelTest method setup.

@Before
public void setup() {
    String columnInfo = "0:0;100 | 1:1;100 | 2:2;100 | 3:3;100";
    String rowInfo = "0:0;40  | 1:1;40  | 2:2;40  | 3:3;40";
    String cellInfo = "A0 | <  | C0 | D0 \n" + "^  | <  | C1 | D1 \n" + "A2 | B2 | C2 | D2 \n" + "A3 | B3 | C3 | D3 \n";
    this.testLayer = new TestLayer(4, 4, columnInfo, rowInfo, cellInfo);
    this.selectionLayer = new SelectionLayer(this.testLayer);
}
Also used : TestLayer(org.eclipse.nebula.widgets.nattable.test.fixture.TestLayer) Before(org.junit.Before)

Example 35 with TestLayer

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

the class TestLayerTest method setup.

@Before
public void setup() {
    String columnInfo = "0:0;100 | 1:1;100 | 2:2;100 | 3:3;100";
    String rowInfo = "0:0;40  | 1:1;40  | 2:2;40  | 3:3;40";
    String cellInfo = "A0~NORMAL:stuff | <  | C0 | D0 \n" + "^               | <  | C1 | D1 \n" + "A2~SELECT       | B2 | C2 | D2 \n" + "A3~:configLabel | B3 | C3 | D3 \n";
    this.testLayer = new TestLayer(4, 4, columnInfo, rowInfo, cellInfo);
}
Also used : TestLayer(org.eclipse.nebula.widgets.nattable.test.fixture.TestLayer) 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