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

Examples of org.eclipse.nebula.widgets.nattable.test.fixture.NatTableFixture.doCommand()


        assertEquals(1, natTableFixture.getColumnIndexByPosition(1));

        // Move to outside the visible range
        List<Integer> columnToMove = Arrays.asList(1, 2, 3);
        int destinationPosition = 10;
        natTableFixture.doCommand(new MultiColumnReorderCommand(
                natTableFixture, columnToMove, destinationPosition));

        // Ensure that the event propagates to the top
        assertEquals(1, listenerFixture.getEventsCount());
        assertNotNull(listenerFixture
View Full Code Here


        natTableFixture.addLayerListener(listenerFixture);

        assertEquals(10, natTableFixture.getColumnCount());

        // hide some columns
        natTableFixture.doCommand(new MultiColumnHideCommand(natTableFixture,
                new int[] { 2, 5, 8 }));

        assertEquals(7, natTableFixture.getColumnCount());

        List<Integer> columnToMove = Arrays.asList(3, 4, 6, 7);
View Full Code Here

        assertEquals(7, natTableFixture.getColumnCount());

        List<Integer> columnToMove = Arrays.asList(3, 4, 6, 7);
        int destinationPosition = 0;
        natTableFixture.doCommand(new MultiColumnReorderCommand(underlyingLayer
                .getColumnReorderLayer(), columnToMove, destinationPosition));

        // verify the event
        ColumnReorderEvent event = (ColumnReorderEvent) listenerFixture
                .getReceivedEvent(ColumnReorderEvent.class);
View Full Code Here

        Assert.assertEquals(1, natTableFixture.getRowIndexByPosition(1));

        // Move to outside the visible range
        List<Integer> rowsToMove = Arrays.asList(1, 2, 3);
        int destinationPosition = 10;
        natTableFixture.doCommand(new MultiRowReorderCommand(natTableFixture,
                rowsToMove, destinationPosition));

        // Ensure that the event propagates to the top
        Assert.assertEquals(1, listenerFixture.getEventsCount());
        Assert.assertNotNull(listenerFixture
View Full Code Here

        MultiColumnHideCommand hideAllCommand = new MultiColumnHideCommand(
                natTableFixture, new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
                        11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
                        25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36 });

        natTableFixture.doCommand(hideAllCommand);
        Assert.assertEquals(1, listenerFixture.getEventsCount());

        ILayerEvent receivedEvent = listenerFixture
                .getReceivedEvent(HideColumnPositionsEvent.class);
        Assert.assertNotNull(receivedEvent);
View Full Code Here

        String originalColumnHeader = natTableFixture.getDataValueByPosition(2,
                0).toString();
        assertEquals("Column 2", originalColumnHeader);

        natTableFixture.doCommand(new RenameColumnHeaderCommand(
                natTableFixture, 2, TEST_COLUMN_NAME));
        String renamedColumnHeader = natTableFixture.getDataValueByPosition(2,
                0).toString();
        assertEquals(TEST_COLUMN_NAME, renamedColumnHeader);
    }
View Full Code Here

        String originalColumnHeader = natTableFixture.getDataValueByPosition(2,
                0).toString();
        assertEquals("Column 2", originalColumnHeader);

        natTableFixture.doCommand(new ColumnReorderCommand(natTableFixture, 1,
                5));

        originalColumnHeader = natTableFixture.getDataValueByPosition(2, 0)
                .toString();
        assertEquals("Column 3", originalColumnHeader);
View Full Code Here

        originalColumnHeader = natTableFixture.getDataValueByPosition(2, 0)
                .toString();
        assertEquals("Column 3", originalColumnHeader);

        natTableFixture.doCommand(new RenameColumnHeaderCommand(
                natTableFixture, 2, TEST_COLUMN_NAME));
        String renamedColumnHeader = natTableFixture.getDataValueByPosition(2,
                0).toString();
        assertEquals(TEST_COLUMN_NAME, renamedColumnHeader);
View Full Code Here

        LayerListenerFixture listener = new LayerListenerFixture();

        natTable.addLayerListener(listener);

        // Grid coordinates
        natTable.doCommand(new RowHideCommand(natTable, 5));

        assertEquals(1, listener.getReceivedEvents().size());
        HideRowPositionsEvent hideEvent = (HideRowPositionsEvent) listener
                .getReceivedEvents().get(0);
View Full Code Here

        natTable.scrollToRow(15);
        assertEquals(15, natTable.getRowIndexByPosition(1));

        // Hide last row - position 5/index 19
        assertEquals(19, natTable.getRowIndexByPosition(5));
        natTable.doCommand(new RowHideCommand(natTable, 5));

        // Assert event received
        assertNotNull(natTableListener
                .getReceivedEvent(HideRowPositionsEvent.class));
        HideRowPositionsEvent hideEvent = (HideRowPositionsEvent) natTableListener
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.