Package org.eclipse.nebula.widgets.nattable.data.validate

Examples of org.eclipse.nebula.widgets.nattable.data.validate.IDataValidator


        IEditableRule editableRule = configRegistry.getConfigAttribute(
                EditConfigAttributes.CELL_EDITABLE_RULE, DisplayMode.EDIT, cell
                        .getConfigLabels().getLabels());

        IDataValidator validator = configRegistry.getConfigAttribute(
                EditConfigAttributes.DATA_VALIDATOR, DisplayMode.EDIT, cell
                        .getConfigLabels().getLabels());

        if (editableRule.isEditable(cell, configRegistry)) {
            // process the tick update
            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$
View Full Code Here


            }

        };

        final Character newValue = Character.valueOf('4');
        IDataValidator dataValidator = new DataValidator() {

            public boolean validate(int columnIndex, int rowIndex,
                    Object newValue) {
                Assert.assertEquals(newValue, newValue);
                return false;
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.data.validate.IDataValidator

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.