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

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


                menuItem.addSelectionListener(new SelectionAdapter() {
                    @Override
                    public void widgetSelected(SelectionEvent event) {
                        int rowPosition = getNatEventData(event)
                                .getRowPosition();
                        natTable.doCommand(new RowHideCommand(natTable,
                                rowPosition));
                    }
                });
            }
        };
View Full Code Here


        assertEquals(2, this.viewportLayer.getMinimumOriginRowPosition());
        assertEquals(0, this.viewportLayer.getMinimumOrigin().getX());
        assertEquals(40, this.viewportLayer.getMinimumOrigin().getY());

        // hide
        this.compositeFreezeLayer.doCommand(new RowHideCommand(this.compositeFreezeLayer,
                0));

        assertEquals(0, this.freezeLayer.getColumnCount());
        assertEquals(1, this.freezeLayer.getRowCount());
        assertEquals(-1, this.freezeLayer.getBottomRightPosition().columnPosition);
View Full Code Here

        assertEquals(2, this.viewportLayer.getMinimumOriginRowPosition());
        assertEquals(0, this.viewportLayer.getMinimumOrigin().getX());
        assertEquals(40, this.viewportLayer.getMinimumOrigin().getY());

        // hide
        this.compositeFreezeLayer.doCommand(new RowHideCommand(this.compositeFreezeLayer,
                1));

        assertEquals(0, this.freezeLayer.getColumnCount());
        assertEquals(1, this.freezeLayer.getRowCount());
        assertEquals(-1, this.freezeLayer.getBottomRightPosition().columnPosition);
View Full Code Here

        assertEquals(2, this.viewportLayer.getMinimumOriginRowPosition());
        assertEquals(0, this.viewportLayer.getMinimumOrigin().getX());
        assertEquals(40, this.viewportLayer.getMinimumOrigin().getY());

        // hide
        this.compositeFreezeLayer.doCommand(new RowHideCommand(this.compositeFreezeLayer,
                3));

        assertEquals(0, this.freezeLayer.getColumnCount());
        assertEquals(2, this.freezeLayer.getRowCount());
        assertEquals(-1, this.freezeLayer.getBottomRightPosition().columnPosition);
View Full Code Here

        assertEquals(0, this.viewportLayer.getMinimumOrigin().getX());
        assertEquals(40, this.viewportLayer.getMinimumOrigin().getY());

        // hide
        this.compositeFreezeLayer.doCommand(
                new RowHideCommand(this.compositeFreezeLayer, 2));

        assertEquals(0, this.freezeLayer.getColumnCount());
        assertEquals(2, this.freezeLayer.getRowCount());
        assertEquals(-1, this.freezeLayer.getBottomRightPosition().columnPosition);
        assertEquals(1, this.freezeLayer.getBottomRightPosition().rowPosition);
View Full Code Here

    public void shouldHideRowForSelectedCell() {
        // Select cell in row we want to hide
        selectionLayer.setSelectedCell(3, 0);

        // Hide selection
        selectionLayer.doCommand(new RowHideCommand(selectionLayer, 3));

        // The previously selected row should be hidden
        Assert.assertTrue(rowHideShowLayer.isRowIndexHidden(3));
        Assert.assertEquals(6, selectionLayer.getRowCount());
    }
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

    @Test
    public void testHideShow() {
        testInit();

        // hide row at position 2: 0 1 3 4
        natTable.doCommand(new RowHideCommand(viewportLayer, 2));

        assertEquals(4, viewportLayer.getRowCount());

        assertEquals(0, viewportLayer.getRowIndexByPosition(0));
        assertEquals(1, viewportLayer.getRowIndexByPosition(1));
View Full Code Here

        natTable.doCommand(new RowReorderCommand(viewportLayer, 4, 1));
        natTable.doCommand(new RowReorderCommand(viewportLayer, 4, 2));
        natTable.doCommand(new RowReorderCommand(viewportLayer, 4, 3));

        // hide row at position 2: 0 1 3 4
        natTable.doCommand(new RowHideCommand(viewportLayer, 2));

        assertEquals(4, viewportLayer.getRowCount());

        assertEquals(4, viewportLayer.getRowIndexByPosition(0));
        assertEquals(3, viewportLayer.getRowIndexByPosition(1));
View Full Code Here

TOP

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

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.