Package org.eclipse.nebula.widgets.nattable.test.fixture

Examples of org.eclipse.nebula.widgets.nattable.test.fixture.TestLayer


    private ColumnReorderLayer reorderLayer;

    @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");
View Full Code Here


    @Test
    public void reorderColumns() {
        reorderLayer.reorderColumnPosition(2, 0);

        TestLayer expectedLayer = new TestLayer(4, 4,
                "2:2;100 | 0:0;100 | 1:1;100 | 3:3;100",
                "0:0;40  | 1:1;40  | 2:2;40  | 3:3;40", "C0 | A0 | B0 | D0 \n"
                        + "C1 | A1 | B1 | D1 \n" + "C2 | A2 | B2 | D2 \n"
                        + "C3 | A3 | B3 | D3 \n");
View Full Code Here

    private RowReorderLayer reorderLayer;

    @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");
View Full Code Here

        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";

        testLayer = new TestLayer(4, 4, columnInfo, rowInfo, cellInfo);

        selectionLayer = new SelectionLayer(testLayer);
    }
View Full Code Here

        String cellInfo = "A0~NORMAL:stuff | <  | C0 | D0 \n"
                + "^               | <  | C1 | D1 \n"
                + "A2~SELECT       | B2 | C2 | D2 \n"
                + "A3~:configLabel | B3 | C3 | D3 \n";

        testLayer = new TestLayer(4, 4, columnInfo, rowInfo, cellInfo);
    }
View Full Code Here

    private FreezeLayer freezeLayer;

    @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");
View Full Code Here

    @Test
    public void testFreezeAll() {
        freezeLayer.setTopLeftPosition(0, 0);
        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");
View Full Code Here

    @Test
    public void testFreezeStart() {
        freezeLayer.setTopLeftPosition(0, 0);
        freezeLayer.setBottomRightPosition(1, 1);

        TestLayer expectedLayer = new TestLayer(2, 2, "0:0;100 | 1:1;100",
                "0:0;40  | 1:1;40", "A0 | B0 \n" + "A1 | B1 \n");

        LayerAssert.assertLayerEquals(expectedLayer, freezeLayer);
    }
View Full Code Here

    @Test
    public void testFreezeMiddle() {
        freezeLayer.setTopLeftPosition(1, 1);
        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, freezeLayer);
    }
View Full Code Here

    @Test
    public void testFreezeEnd() {
        freezeLayer.setTopLeftPosition(1, 1);
        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, freezeLayer);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.test.fixture.TestLayer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.