Examples of MoveSelectionCommand


Examples of org.eclipse.nebula.widgets.nattable.selection.command.MoveSelectionCommand

        // only move the selection if the update succeeded, otherwise the editor
        // will stay open
        if (committed) {
            switch (direction) {
                case LEFT:
                    this.layer.doCommand(new MoveSelectionCommand(
                            MoveDirectionEnum.LEFT, false, false));
                    break;
                case UP:
                    this.layer.doCommand(new MoveSelectionCommand(
                            MoveDirectionEnum.UP, false, false));
                    break;
                case RIGHT:
                    this.layer.doCommand(new MoveSelectionCommand(
                            MoveDirectionEnum.RIGHT, false, false));
                    break;
                case DOWN:
                    this.layer.doCommand(new MoveSelectionCommand(
                            MoveDirectionEnum.DOWN, false, false));
                    break;
            }
        }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.command.MoveSelectionCommand

    public void scrollVerticallyByAPage(ScrollSelectionCommand scrollSelectionCommand) {
        getUnderlyingLayer().doCommand(scrollVerticallyByAPageCommand(scrollSelectionCommand));
    }

    protected MoveSelectionCommand scrollVerticallyByAPageCommand(ScrollSelectionCommand scrollSelectionCommand) {
        return new MoveSelectionCommand(
                scrollSelectionCommand.getDirection(), getRowCount(),
                scrollSelectionCommand.isShiftMask(), scrollSelectionCommand.isControlMask());
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.command.MoveSelectionCommand

        super(MoveDirectionEnum.RIGHT);
    }

    public void run(NatTable natTable, KeyEvent event) {
        super.run(natTable, event);
        natTable.doCommand(new MoveSelectionCommand(MoveDirectionEnum.RIGHT,
                SelectionLayer.MOVE_ALL, isShiftMask(), isControlMask()));
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.command.MoveSelectionCommand

    @Override
    public void run(NatTable natTable, KeyEvent event) {
        super.run(natTable, event);

        MoveSelectionCommand command = null;
        if (this.traversalStrategy == null) {
            command = new MoveSelectionCommand(
                    getDirection(), 1, isShiftMask(), isControlMask());
        }
        else {
            command = new MoveSelectionCommand(
                    getDirection(), this.traversalStrategy, isShiftMask(), isControlMask());
        }
        natTable.doCommand(command);
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.command.MoveSelectionCommand

        super(MoveDirectionEnum.LEFT);
    }

    public void run(NatTable natTable, KeyEvent event) {
        super.run(natTable, event);
        natTable.doCommand(new MoveSelectionCommand(MoveDirectionEnum.LEFT,
                SelectionLayer.MOVE_ALL, isShiftMask(), isControlMask()));
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.command.MoveSelectionCommand

    }

    @Override
    public void run(NatTable natTable, KeyEvent event) {
        super.run(natTable, event);
        natTable.doCommand(new MoveSelectionCommand(MoveDirectionEnum.DOWN,
                SelectionLayer.MOVE_ALL, isShiftMask(), isControlMask()));
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.command.MoveSelectionCommand

    }

    @Override
    public void run(NatTable natTable, KeyEvent event) {
        super.run(natTable, event);
        natTable.doCommand(new MoveSelectionCommand(MoveDirectionEnum.UP,
                SelectionLayer.MOVE_ALL, isShiftMask(), isControlMask()));
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.command.MoveSelectionCommand

        this.selectionLayer.setSelectedCell(0, 0);
        assertEquals(0, this.selectionLayer.getLastSelectedCell().getColumnPosition());
        assertEquals(0, this.selectionLayer.getLastSelectedCell().getRowPosition());

        // move one to left at beginning -> stay
        this.viewportLayer.doCommand(new MoveSelectionCommand(MoveDirectionEnum.LEFT, false, false));

        assertEquals(0, this.selectionLayer.getLastSelectedCell().getColumnPosition());
        assertEquals(0, this.selectionLayer.getLastSelectedCell().getRowPosition());
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.command.MoveSelectionCommand

        this.selectionLayer.setSelectedCell(4, 4);
        assertEquals(4, this.selectionLayer.getLastSelectedCell().getColumnPosition());
        assertEquals(4, this.selectionLayer.getLastSelectedCell().getRowPosition());

        // move 3 steps to left
        this.viewportLayer.doCommand(new MoveSelectionCommand(MoveDirectionEnum.LEFT, 3, false, false));

        assertEquals(1, this.selectionLayer.getLastSelectedCell().getColumnPosition());
        assertEquals(4, this.selectionLayer.getLastSelectedCell().getRowPosition());
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.command.MoveSelectionCommand

        this.selectionLayer.setSelectedCell(2, 4);
        assertEquals(2, this.selectionLayer.getLastSelectedCell().getColumnPosition());
        assertEquals(4, this.selectionLayer.getLastSelectedCell().getRowPosition());

        // move 4 steps to left
        this.viewportLayer.doCommand(new MoveSelectionCommand(MoveDirectionEnum.LEFT, 4, false, false));

        assertEquals(8, this.selectionLayer.getLastSelectedCell().getColumnPosition());
        assertEquals(3, this.selectionLayer.getLastSelectedCell().getRowPosition());
    }
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.