Sets the DataFrameModel and columnDtypeModel's
        editable properties.
        :param editable: bool
            defaults to True,
            False disables most editing methods.
        :return:
            None
437643
def enableEditing(self, editable=True):
        
        self.editable = editable
        self._columnDtypeModel.setEditable(self.editable)
1128706
def createEditor(self, parent, column, operator, value):
        
        if type(value) == datetime.timedelta:
            editor = XTimeDeltaEdit(parent)
            editor.setAttribute(Qt.WA_DeleteOnClose)
            editor.setDelta(value)
            return editor
        
        else:
            editor = super(DateTimePlugin, self).createEditor(parent,
                                                              column,
                                                              operator,
                                                              value)
        
            if isinstance(editor, XDateTimeEdit) or \
               isinstance(editor, XDateEdit):
                editor.setCalendarPopup(True)
            
            return editor
1336907
public static boolean setEditable(Element element, String serverId, boolean editable) {

        I_CmsLayoutBundle.INSTANCE.editorCss().ensureInjected();
        NodeList<Element> children = CmsDomUtil.querySelectorAll(
            FIELD_SELECTOR + ENTITY_ID_SELECTOR_PREFIX + serverId + ENTITY_ID_SELECTOR_SUFFIX,
            element);
        if (children.getLength() > 0) {
            for (int i = 0; i < children.getLength(); i++) {
                Element child = children.getItem(i);
                if (editable) {
                    child.addClassName(I_CmsLayoutBundle.INSTANCE.editorCss().inlineEditable());
                } else {
                    child.removeClassName(I_CmsLayoutBundle.INSTANCE.editorCss().inlineEditable());
                }
            }
            return true;
        }
        return false;
    }
350411
def get_supported_types():
    
    from datetime import date, timedelta
    editable_types = [int, float, complex, list, set, dict, tuple, date,
                      timedelta] + list(TEXT_TYPES) + list(INT_TYPES)
    try:
        from numpy import ndarray, matrix, generic
        editable_types += [ndarray, matrix, generic]
    except:
        pass
    try:
        from pandas import DataFrame, Series, DatetimeIndex
        editable_types += [DataFrame, Series, Index]
    except:
        pass
    picklable_types = editable_types[:]
    try:
        from spyder.pil_patch import Image
        editable_types.append(Image.Image)
    except:
        pass
    return dict(picklable=picklable_types, editable=editable_types)
431778
def setEditorData( self, editor, index ):
        
        item        = self.parent().itemFromIndex(index)
        value       = item.value()
        tree        = self.parent()
        querywidget = tree.parent()
        factory     = querywidget.factory()
        
        factory.setEditorData(editor, value)
204196
void setColNullability(ColumnSchema column, boolean nullable) {

        Constraint c        = null;
        int        colIndex = table.getColumnIndex(column.getName().name);

        if (column.isNullable() == nullable) {
            return;
        }

        if (nullable) {
            if (column.isPrimaryKey()) {
                throw Error.error(ErrorCode.X_42526);
            }

            table.checkColumnInFKConstraint(colIndex, Constraint.SET_NULL);
            removeColumnNotNullConstraints(colIndex);
        } else {
            HsqlName constName = database.nameManager.newAutoName("CT",
                table.getSchemaName(), table.getName(),
                SchemaObject.CONSTRAINT);

            c       = new Constraint(constName, true, null, Constraint.CHECK);
            c.check = new ExpressionLogical(column);

            c.prepareCheckConstraint(session, table, true);
            column.setNullable(false);
            table.addConstraint(c);
            table.setColumnTypeVars(colIndex);
            database.schemaManager.addSchemaObject(c);
        }
    }
427880
def createEditor(self, parent, column, operator, value):
        
        editor = super(ForeignKeyPlugin, self).createEditor(parent,
                                                            column,
                                                            operator,
                                                            value)
        
        if editor is not None:
            editor.setRequired(column.required())
            editor.setMinimumWidth(150)
            
            model = column.referenceModel()
            if model:
                text = model.schema().displayName().lower()
                editor.setHint('any {0}'.format(text))
                
                editor.setRecords(model.select())
                if operator in ('is in', 'is not in'):
                    editor.setCheckable(True)
        
        return editor
148222
def set_columns(self, types):
        
        if self._types:
            raise wandb.Error('TypedTable.set_columns called more than once.')
        try:
            for key, type_ in types:
                if type_ not in TYPE_TO_TYPESTRING:
                    raise wandb.Error('TypedTable.set_columns received invalid type ({}) for key "{}".\n  Valid types: {}'.format(
                        type_, key, '[%s]' % ', '.join(VALID_TYPE_NAMES)))
        except TypeError:
            raise wandb.Error(
                'TypedTable.set_columns requires iterable of (column_name, type) pairs.')
        self._types = dict(types)
        self._output.add({
            'typemap': {k: TYPE_TO_TYPESTRING[type_] for k, type_ in types},
            'columns': [t[0] for t in types]})
1004399
def editCell(self, vcolidx=None, rowidx=None, **kwargs):
        ''

        if vcolidx is None:
            vcolidx = self.cursorVisibleColIndex
        x, w = self.visibleColLayout.get(vcolidx, (0, 0))

        col = self.visibleCols[vcolidx]
        if rowidx is None:
            rowidx = self.cursorRowIndex
        if rowidx < 0:  # header
            y = 0
            currentValue = col.name
        else:
            y = self.rowLayout.get(rowidx, 0)
            currentValue = col.getDisplayValue(self.rows[self.cursorRowIndex])

        editargs = dict(value=currentValue,
                        fillchar=options.disp_edit_fill,
                        truncchar=options.disp_truncator)
        editargs.update(kwargs)  # update with user-specified args
        r = self.vd.editText(y, x, w, **editargs)
        if rowidx >= 0:  # if not header
            r = col.type(r)  # convert input to column type, let exceptions be raised

        return r
279680
def UpdateColums(self, cursor, field, FieldType, model, columns, UNCHANGED):
        '''
        '''
        table = model.__name__.lower()
        if field not in columns:
            n = UNCHANGED.pop()
            new_sql = f"ALTER TABLE {table} ADD COLUMN {field} {FieldType} AFTER {n}"
            cursor.execute(new_sql)
            print("\n\n", new_sql)
        else:
            UNCHANGED.append(field)

        # We drop the fields in the table not in models
        TCOLS = set(columns)-set(model._fields)
        for col in TCOLS:
            columns.remove(col)
            QRY = f"ALTER TABLE {table} DROP COLUMN {col}"
            cursor.execute(QRY)
            print("\n\n", QRY)

        return True
354457
def setModelData( self, editor, model, index ):
        
        tree        = self.parent()
        querywidget = tree.parent()
        factory     = querywidget.factory()
        item        = tree.itemFromIndex(index)
        
        value = factory.editorData(editor)
        item.setValue(value)
840414
def setEditorData(self, editor, index):
        
        # We take the config value via the model to be consistent with setModelData
        data = index.model().data(index, Qt.EditRole)
        editor.setData(data)
1242451
protected boolean isEditable(Object row, int column) {
        beanWrapper.setWrappedInstance(row);
        return beanWrapper.isWritableProperty(columnPropertyNames[column]);
    }
485242
public void setEditMode(final EditMode mode) {

        if (!m_modeSelect.getValue().equals(mode)) {
            m_modeSelect.setValue(mode);
        }
    }
546499
def createEditor(self, parent, column, op, value):
        
        try:
            cls = self._operatorMap[nativestring(op)].cls
        except KeyError, AttributeError:
            return None
        
        # create the new editor
        if cls:
            widget = cls(parent)
            widget.setAttribute(Qt.WA_DeleteOnClose)
            projexui.setWidgetValue(widget, value)
            return widget
        
        return None
463277
def setEditorData(self, spinBox, index):
        
        if index.isValid():
            value = index.model().data(index, QtCore.Qt.EditRole)
            spinBox.setValue(value)
1288161
def require_editable(f):
    

    def wrapper(self, *args, **kwargs):
        if not self._edit:
            raise RegistryKeyNotEditable("The key is not set as editable.")
        return f(self, *args, **kwargs)

    return wrapper