Examples of IEditableRule


Examples of org.eclipse.nebula.widgets.nattable.config.IEditableRule

     */
    public static boolean allCellsEditable(Collection<ILayerCell> selectedCells, IConfigRegistry configRegistry) {
        if (selectedCells != null) {
            for (ILayerCell layerCell : selectedCells) {
                LabelStack labelStack = layerCell.getConfigLabels();
                IEditableRule editableRule = configRegistry.getConfigAttribute(
                        EditConfigAttributes.CELL_EDITABLE_RULE,
                        DisplayMode.EDIT,
                        labelStack.getLabels());

                if (editableRule == null
                        || !editableRule.isEditable(layerCell, configRegistry)) {
                    return false;
                }
            }
        }
        return true;
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.config.IEditableRule

    public static boolean isCellEditable(ILayer layer,
            IConfigRegistry configRegistry, PositionCoordinate cellCoords) {
        ILayerCell layerCell = layer.getCellByPosition(cellCoords.columnPosition, cellCoords.rowPosition);
        LabelStack labelStack = layerCell.getConfigLabels();

        IEditableRule editableRule = configRegistry.getConfigAttribute(
                EditConfigAttributes.CELL_EDITABLE_RULE,
                DisplayMode.EDIT,
                labelStack.getLabels());
        if (editableRule == null) {
            return false;
        }

        return editableRule.isEditable(layerCell, configRegistry);
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.config.IEditableRule

        ILayerCell cell = command.getCell();
        Composite parent = command.getParent();
        IConfigRegistry configRegistry = command.getConfigRegistry();

        // check if the cell is editable
        IEditableRule rule = configRegistry.getConfigAttribute(
                EditConfigAttributes.CELL_EDITABLE_RULE, DisplayMode.EDIT, cell
                        .getConfigLabels().getLabels());

        if (rule.isEditable(cell, configRegistry)) {
            EditController.editCell(cell, parent, cell.getDataValue(),
                    configRegistry);
        }

        // as commands by default are intended to be consumed by the handler,
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.config.IEditableRule

        ILayerCell cell = selectionLayer.getCellByPosition(
                selectedPosition.columnPosition, selectedPosition.rowPosition);

        IConfigRegistry configRegistry = command.getConfigRegistry();

        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
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.