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

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


                        new ColumnInsertEvent(glazedListsGridLayer
                                .getBodyDataLayer(), columns.size() - 1));
            }
        });

        natTable.doCommand(new ColumnHideCommand(glazedListsGridLayer
                .getBodyLayer(), 1));

        return panel;
    }
View Full Code Here


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        // The previously selected column should be hidden
        Assert.assertTrue(columnHideShowLayer.isColumnIndexHidden(3));
        Assert.assertEquals(4, selectionLayer.getColumnCount());
    }
View Full Code Here

        Assert.assertEquals(2, freezeLayer.getColumnIndexByPosition(1));
    }

    @Test
    public void testHideShowInteriorColumn() {
        hideShowLayer.doCommand(new ColumnHideCommand(hideShowLayer, 2));

        Assert.assertEquals(2, freezeLayer.getColumnCount());
        Assert.assertEquals(1, freezeLayer.getColumnIndexByPosition(0));
        Assert.assertEquals(3, freezeLayer.getColumnIndexByPosition(1));
View Full Code Here

     * -----------------------------------------------------
     */
    @Test
    public void hideColumnsAndReorder() throws Exception {
        // Hide 3, 4
        layerStack.doCommand(new ColumnHideCommand(layerStack, 3));
        layerStack.doCommand(new ColumnHideCommand(layerStack, 3));

        assertEquals(0, layerStack.getColumnIndexByPosition(0));
        assertEquals(1, layerStack.getColumnIndexByPosition(1));
        assertEquals(2, layerStack.getColumnIndexByPosition(2));
        assertEquals(5, layerStack.getColumnIndexByPosition(3));
View Full Code Here

        assertEquals(3, layerStack.getColumnIndexByPosition(3));
        assertEquals(100, layerStack.getColumnWidthByPosition(3));
        assertEquals(700, layerStack.getStartXOfColumnPosition(3));

        // Hide 2
        layerStack.doCommand(new ColumnHideCommand(layerStack, 2));
        assertEquals(9, layerStack.getColumnCount());

        assertEquals(1, layerStack.getColumnIndexByPosition(1));
        assertEquals(100, layerStack.getColumnWidthByPosition(1));
        assertEquals(100, layerStack.getStartXOfColumnPosition(1));
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.