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

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


        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


    public static final String RENAMED_COLUMN_INDICATOR = "*"; //$NON-NLS-1$

    public static void hideColumnEntries(List<ColumnEntry> removedItems,
            ColumnHideShowLayer hideShowLayer) {
        MultiColumnHideCommand hideCommand = new MultiColumnHideCommand(
                hideShowLayer,
                asIntArray(getColumnEntryPositions(removedItems)));
        hideShowLayer.doCommand(hideCommand);
    }
View Full Code Here

        hideShowLayer.doCommand(hideCommand);
    }

    public static void hideColumnPositions(List<Integer> removedPositions,
            ColumnHideShowLayer hideShowLayer) {
        MultiColumnHideCommand hideCommand = new MultiColumnHideCommand(
                hideShowLayer, asIntArray(removedPositions));
        hideShowLayer.doCommand(hideCommand);
    }
View Full Code Here

        Assert.assertEquals(37, bodyLayerStackFixture.getBodyDataProvider()
                .getColumnCount());
        Assert.assertEquals(6, natTableFixture.getColumnCount());

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

     * @return <code>true</code> if the command has been handled,
     *         <code>false</code> otherwise
     */
    protected boolean handleColumnHideCommand(ColumnHideCommand command) {
        if (isColumnPositionFullySelected(command.getColumnPosition())) {
            return handleMultiColumnHideCommand(new MultiColumnHideCommand(
                    this, getFullySelectedColumnPositions()));
        } else {
            return super.doCommand(command);
        }
    }
View Full Code Here

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

        // hide
        this.compositeFreezeLayer.doCommand(
                new MultiColumnHideCommand(this.compositeFreezeLayer, new int[] { 0, 1 }));

        assertEquals(0, 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 MultiColumnHideCommand(this.compositeFreezeLayer, new int[] { 2, 3, 4 }));

        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 MultiColumnHideCommand(this.compositeFreezeLayer, new int[] { 0, 3 }));

        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 MultiColumnHideCommand(this.compositeFreezeLayer, new int[] { 1, 2 }));

        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(400, this.viewportLayer.getMinimumOrigin().getX());
        assertEquals(0, this.viewportLayer.getMinimumOrigin().getY());

        // hide column 1 and 2
        this.compositeFreezeLayer.doCommand(
                new MultiColumnHideCommand(this.compositeFreezeLayer, new int[] { 1, 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

TOP

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

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.