Examples of UpdateDataCommand


Examples of org.eclipse.nebula.widgets.nattable.edit.command.UpdateDataCommand

     * org.eclipse.nebula.widgets.nattable.selection.SelectionLayer
     * .MoveDirectionEnum)
     */
    @Override
    public boolean commit(Object canonicalValue, MoveDirectionEnum direction) {
        boolean committed = this.layer.doCommand(new UpdateDataCommand(this.layer,
                this.columnPosition, this.rowPosition, canonicalValue));

        // only move the selection if the update succeeded, otherwise the editor
        // will stay open
        if (committed) {
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.edit.command.UpdateDataCommand

                                        selectedCell.getDataValue(),
                                        editorValue);
                            }
                            ILayer layer = selectedCell.getLayer();

                            layer.doCommand(new UpdateDataCommand(layer,
                                    selectedCell.getColumnPosition(),
                                    selectedCell.getRowPosition(), editorValue));
                        }
                    }
                } else {
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.edit.command.UpdateDataCommand

                .getCheckedCellsCount(columnPosition,
                        natTable.getConfigRegistry());
        boolean targetState = checkedCellsCount < bodyDataLayer.getRowCount();

        for (int rowPosition = 0; rowPosition < bodyDataLayer.getRowCount(); rowPosition++) {
            bodyDataLayer.doCommand(new UpdateDataCommand(bodyDataLayer,
                    columnPosition, rowPosition, targetState));
        }
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.edit.command.UpdateDataCommand

    @Test
    public void shouldHandleClearFilterCommand() throws Exception {
        Assert.assertEquals(13, filterList.size());

        layerUnderTest.doCommand(new UpdateDataCommand(layerUnderTest, 1, 2,
                "ford"));
        Assert.assertEquals(1, filterList.size());

        layerUnderTest.doCommand(new ClearFilterCommand(layerUnderTest, 1));
        Assert.assertEquals(13, filterList.size());
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.edit.command.UpdateDataCommand

    @Test
    public void shouldHandleTheClearAllFiltersCommand() throws Exception {
        Assert.assertEquals(13, filterList.size());

        layerUnderTest.doCommand(new UpdateDataCommand(layerUnderTest, 1, 2,
                "ford"));
        Assert.assertEquals(1, filterList.size());

        layerUnderTest.doCommand(new UpdateDataCommand(layerUnderTest, 0, 2,
                "XXX"));
        Assert.assertEquals(0, filterList.size());

        layerUnderTest.doCommand(new ClearAllFiltersCommand());
        Assert.assertEquals(13, filterList.size());
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.edit.command.UpdateDataCommand

    @Test
    public void shouldHandleClearFilterCommand() throws Exception {
        assertEquals(13, filterList.size());

        layerUnderTest.doCommand(new UpdateDataCommand(layerUnderTest, 1, 0,
                "ford"));
        assertEquals(1, filterList.size());

        layerUnderTest.doCommand(new ClearFilterCommand(layerUnderTest, 1));
        assertEquals(13, filterList.size());
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.edit.command.UpdateDataCommand

    @Test
    public void shouldHandleTheClearAllFiltersCommand() throws Exception {
        assertEquals(13, filterList.size());

        layerUnderTest.doCommand(new UpdateDataCommand(layerUnderTest, 1, 0,
                "ford"));
        assertEquals(1, filterList.size());

        layerUnderTest.doCommand(new UpdateDataCommand(layerUnderTest, 0, 0,
                "XXX"));
        assertEquals(0, filterList.size());

        layerUnderTest.doCommand(new ClearAllFiltersCommand());
        assertEquals(13, filterList.size());
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.edit.command.UpdateDataCommand

            Object newValue = getNewCellValue(command, cell);
            // validate the value
            try {
                if (validator == null
                        || validator.validate(cell, configRegistry, newValue)) {
                    selectionLayer.doCommand(new UpdateDataCommand(
                            selectionLayer, selectedPosition.columnPosition,
                            selectedPosition.rowPosition, newValue));
                } else {
                    log.warn("Tick update failed for cell at " + selectedPosition + " and value " + newValue //$NON-NLS-1$ //$NON-NLS-2$
                            + ". New value is not valid!"); //$NON-NLS-1$
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.edit.command.UpdateDataCommand

    private UpdateDataCommand command;

    @Before
    public void setup() {
        dataLayer = new DataLayerFixture();
        command = new UpdateDataCommand(dataLayer, 2, 2, TEST_VALUE);
    }
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.