Examples of TickUpdateCommand


Examples of org.eclipse.nebula.widgets.nattable.tickupdate.command.TickUpdateCommand

        this.increment = increment;
    }

    @Override
    public void run(NatTable natTable, KeyEvent event) {
        natTable.doCommand(new TickUpdateCommand(natTable.getConfigRegistry(),
                increment));
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.tickupdate.command.TickUpdateCommand

    @Test
    public void shouldIncrementCellValue() throws Exception {
        assertEquals("[1, 1]", selectionLayer.getDataValueByPosition(1, 1));
        commandHandler
                .doCommand(new TickUpdateCommand(testConfigRegistry, true));
        assertEquals("[1, 1]up", selectionLayer.getDataValueByPosition(1, 1));
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.tickupdate.command.TickUpdateCommand

    }

    @Test
    public void shouldDecrementCellValue() throws Exception {
        assertEquals("[1, 1]", selectionLayer.getDataValueByPosition(1, 1));
        commandHandler.doCommand(new TickUpdateCommand(testConfigRegistry,
                false));
        assertEquals("[1, 1]down", selectionLayer.getDataValueByPosition(1, 1));
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.tickupdate.command.TickUpdateCommand

        assertEquals("[1, 1]", selectionLayer.getDataValueByPosition(1, 1));

        // Increment
        commandHandler
                .doCommand(new TickUpdateCommand(testConfigRegistry, true));
        assertEquals("[1, 1]", selectionLayer.getDataValueByPosition(1, 1));

        // Decrement
        commandHandler.doCommand(new TickUpdateCommand(testConfigRegistry,
                false));
        assertEquals("[1, 1]", selectionLayer.getDataValueByPosition(1, 1));
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.tickupdate.command.TickUpdateCommand

        assertEquals("[1, 2]", selectionLayer.getDataValueByPosition(1, 2));
        assertEquals("[1, 5]", selectionLayer.getDataValueByPosition(1, 5));

        // Increment
        commandHandler
                .doCommand(new TickUpdateCommand(testConfigRegistry, true));

        assertEquals("[1, 1]up", selectionLayer.getDataValueByPosition(1, 1));
        assertEquals("[1, 2]up", selectionLayer.getDataValueByPosition(1, 2));
        assertEquals("[1, 3]", selectionLayer.getDataValueByPosition(1, 3));
        assertEquals("[1, 5]up", selectionLayer.getDataValueByPosition(1, 5));
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.tickupdate.command.TickUpdateCommand

        selectionLayer.selectCell(1, 1, false, false);
        selectionLayer.selectCell(2, 1, false, true); // Select with Ctrl key

        // Increment
        commandHandler
                .doCommand(new TickUpdateCommand(testConfigRegistry, true));

        // Should not increment - editors different
        assertEquals("[1, 1]", selectionLayer.getDataValueByPosition(1, 1));
        assertEquals("[2, 1]", selectionLayer.getDataValueByPosition(2, 1));

        // Select cells in column 1 Only
        selectionLayer.selectCell(1, 1, false, false);
        selectionLayer.selectCell(1, 2, false, true); // Select with Ctrl key

        // Increment
        commandHandler
                .doCommand(new TickUpdateCommand(testConfigRegistry, true));

        // Should increment - same editor
        assertEquals("[1, 1]up", selectionLayer.getDataValueByPosition(1, 1));
        assertEquals("[1, 2]up", selectionLayer.getDataValueByPosition(1, 2));
    }
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.