Package org.eclipse.nebula.widgets.nattable.hideshow.command

Examples of org.eclipse.nebula.widgets.nattable.hideshow.command.ColumnHideCommand


        // Index in group: 5, 6, 7
        model.addColumnsIndexesToGroup(TEST_GROUP_NAME_2, 7);
        assertEquals(3, columnGroupLayer.getColumnSpan(5));

        // Hide position 6
        ColumnHideCommand hideColumnCommand = new ColumnHideCommand(
                gridLayer.getBodyLayer(), 6);
        gridLayer.getBodyLayer().getColumnHideShowLayer()
                .doCommand(hideColumnCommand);

        assertEquals(2, columnGroupLayer.getColumnSpan(5));

        // Hide position 5
        hideColumnCommand = new ColumnHideCommand(gridLayer.getBodyLayer(), 6);
        gridLayer.getBodyLayer().getColumnHideShowLayer()
                .doCommand(hideColumnCommand);

        assertEquals(1, columnGroupLayer.getColumnSpan(5));
    }
View Full Code Here


        natTableFixture.doCommand(new RowReorderCommand(natTableFixture, 1, 5));
        assertEquals(1, natTableFixture.getRowIndexByPosition(1));

        // Hide column with index 3 (grid coordinates)
        assertEquals(3, natTableFixture.getColumnIndexByPosition(3));
        natTableFixture.doCommand(new ColumnHideCommand(natTableFixture, 3));
        assertEquals(0, natTableFixture.getColumnIndexByPosition(3));

        natTableFixture.saveState(TEST_PERSISTENCE_PREFIX, properties);

        // Ensure that properties got persisted
View Full Code Here

        LayerListenerFixture listener = new LayerListenerFixture();

        natTable.addLayerListener(listener);

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

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

        natTable.scrollToColumn(14);
        assertEquals(14, natTable.getColumnIndexByPosition(1));

        // Hide last column - position 6/index 19
        assertEquals(19, natTable.getColumnIndexByPosition(6));
        natTable.doCommand(new ColumnHideCommand(natTable, 6));

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

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.hideshow.command.ColumnHideCommand

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.