Examples of ILayerCommand


Examples of org.eclipse.nebula.widgets.nattable.command.ILayerCommand

    // Commands

    @Override
    public boolean doCommand(ILayerCommand command) {
        // Invoke command handler(s) on the Dimensionally dependent layer
        ILayerCommand clonedCommand = command.cloneCommand();
        if (super.doCommand(command)) {
            return true;
        }

        clonedCommand = command.cloneCommand();
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.command.ILayerCommand

    // Commands

    @Override
    public boolean doCommand(ILayerCommand command) {
        // Invoke command handler(s) on the Dimensionally dependent layer
        ILayerCommand clonedCommand = command.cloneCommand();
        if (super.doCommand(clonedCommand)) {
            return true;
        }

        clonedCommand = command.cloneCommand();
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.command.ILayerCommand

                for (int i = 0; i < fromPositions.size(); i++) {
                    boolean columnGroupMoved = columnGroupMoved(
                            fromPositions.get(i), movedColumnGroupEntries);
                    boolean multipleColumnsMoved = fromPositions.get(i).size() > 1;

                    ILayerCommand command = null;
                    if (!columnGroupMoved && !multipleColumnsMoved) {
                        int fromPosition = fromPositions.get(i).get(0)
                                .intValue();
                        int toPosition = adjustToPosition(direction,
                                toPositions.get(i).intValue());
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.command.ILayerCommand

                fromPositions);

        for (int i = 0; i < fromPositions.size(); i++) {
            boolean multipleColumnsMoved = fromPositions.get(i).size() > 1;

            ILayerCommand command = null;
            if (!multipleColumnsMoved) {
                int fromPosition = fromPositions.get(i).get(0).intValue();
                int toPosition = toPositions.get(i);
                command = new ColumnReorderCommand(columnHideShowLayer,
                        fromPosition, toPosition);
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.command.ILayerCommand

            }
        }
    }

    private void doSelect(SelectionItem selection) {
        ILayerCommand command;
        if (selection.pos.columnPosition != SelectionLayer.NO_SELECTION) {
            command = createSelectCellCommand(selection.pos);
        } else {
            command = new ClearAllSelectionsCommand();
        }
        final ILayerCommand finalCommand = command;
        BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
            @Override
            public void run() {
                natTable.doCommand(finalCommand);
            }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.command.ILayerCommand

    @Test
    public void testReorderColumnCommand() {
        int fromColumnPosition = 4;
        int toColumnPosition = 1;
        ILayerCommand reorderColumnCommand = new ColumnReorderCommand(
                columnReorderLayer, fromColumnPosition, toColumnPosition);

        columnReorderLayer.doCommand(reorderColumnCommand);

        Assert.assertEquals(0, columnReorderLayer.getColumnIndexByPosition(0));
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.command.ILayerCommand

    @Test
    public void testReorderRowCommand() {
        int fromRowPosition = 4;
        int toRowPosition = 1;
        ILayerCommand reorderRowCommand = new RowReorderCommand(
                rowReorderLayer, fromRowPosition, toRowPosition);

        rowReorderLayer.doCommand(reorderRowCommand);

        Assert.assertEquals(0, rowReorderLayer.getRowIndexByPosition(0));
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.command.ILayerCommand

        }
    }

    private boolean doCommandOnChildLayer(ILayerCommand command,
            ILayer childLayer) {
        ILayerCommand childCommand = command.cloneCommand();
        return childLayer.doCommand(childCommand);
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.command.ILayerCommand

        return doCommandOnChildLayers(command);
    }

    protected boolean doCommandOnChildLayers(ILayerCommand command) {
        for (ILayer childLayer : this.childLayerToLayoutCoordinateMap.keySet()) {
            ILayerCommand childCommand = command.cloneCommand();
            if (childLayer.doCommand(childCommand)) {
                return true;
            }
        }
        return false;
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.command.ILayerCommand

    }

    @Test
    public void testHideColumnCommand() {
        int columnPosition = 2;
        ILayerCommand hideColumnCommand = new MultiColumnHideCommand(
                columnHideShowLayer, columnPosition);

        Assert.assertEquals(5, columnHideShowLayer.getColumnCount());

        columnHideShowLayer.doCommand(hideColumnCommand);
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.