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

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


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


    private ColumnHideShowLayer hideShowLayer;

    @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 | B0 | C0 | D0 \n" + "A1 | B1 | C1 | D1 \n"
                + "A2 | B2 | C2 | D2 \n" + "A3 | B3 | C3 | D3 \n";

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

        viewportLayer = new ViewportLayer(dataLayer);
        viewportLayer.setClientAreaProvider(new IClientAreaProvider() {

            public Rectangle getClientArea() {
View Full Code Here

        String rowInfo = "0:0;40  | 1:1;40  | 2:2;40  | 3:3;40";

        String cellInfo = "C0 | D0 \n" + "C1 | D1 \n" + "C2 | D2 \n"
                + "C3 | D3 \n";

        TestLayer expectedLayer = new TestLayer(2, 4, 400, 4, 4, 160,
                columnInfo, rowInfo, cellInfo);

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

    @Test
    public void hideColumn() {
        hideShowLayer
                .hideColumnPositions(Arrays.asList(new Integer[] { 0, 2 }));

        TestLayer expectedLayer = new TestLayer(2, 4, "1:1;100 | 3:3;100",
                "0:0;40  | 1:1;40  | 2:2;40  | 3:3;40", "B0 | D0 \n"
                        + "B1 | D1 \n" + "B2 | D2 \n" + "B3 | D3 \n");

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

    @Test
    public void hideLastColumn() throws Exception {
        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");
View Full Code Here

    private FreezeLayer freezeLayer;
    private CompositeFreezeLayer compositeFreezeLayer;

    @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

                .doCommand(new InitializeClientAreaCommandFixture());
    }

    @Test
    public void testNotFrozen() {
        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~:NONFROZEN_REGION | B0~:NONFROZEN_REGION | C0~:NONFROZEN_REGION | D0~:NONFROZEN_REGION \n"
View Full Code Here

    @Test
    public void testFreezeAllColumns() {
        compositeFreezeLayer.doCommand(new FreezeColumnCommand(
                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"
View Full Code Here

    @Test
    public void testFreezeColumns() {
        compositeFreezeLayer.doCommand(new FreezeColumnCommand(
                compositeFreezeLayer, 1));

        TestLayer expectedLayer = new TestLayer(
                4,
                4,
                "0:0;100 | 1:1;100 | 2:0;100 | 3:1;100",
                "0:0;40  | 1:1;40  | 2:2;40  | 3:3;40",
                "A0~:FROZEN_COLUMN_REGION | B0~:FROZEN_COLUMN_REGION | C0~:NONFROZEN_REGION | D0~:NONFROZEN_REGION \n"
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.