Sets whether or not this combo box is editable.

        :param      state | <bool>
433106
def setEditable(self, state):
        
        self._editable = state
        self._hourCombo.setEditable(state)
        self._minuteCombo.setEditable(state)
        self._secondCombo.setEditable(state)
        self._timeOfDayCombo.setEditable(state)
1320653
public void setState(S state){
		Integer id = definition.getStateId(state);
		currentStateId.set(id);
	}
1327702
protected void setState(State state) {
        if (DEBUG)
            LOG.debug("{} --> {}", _state, state);
        _state = state;
    }
1366818
def setReadOnly(self, state):
        
        self._readOnly = state
        
        for editor in self.editors():
            editor.setReadOnly(state)
669941
def on_state_changed(self, state):
        """"""
        if state:
            self.editor.sig_key_pressed.connect(self._on_key_pressed)
        else:
            self.editor.sig_key_pressed.disconnect(self._on_key_pressed)
912088
def is_assignment_allowed(self):
        
        if not self.is_manage_allowed():
            return False
        review_state = api.get_workflow_status_of(self.context)
        edit_states = ["open", "attachment_due", "to_be_verified"]
        return review_state in edit_states
1179894
public void setState(State state) {
    this.state = state;
    setText(state.isPrimary() ? text1 : text2);
  }
284409
def setShowAddButton(self, state):
        
        self._showAddButton = state
        self._addButton.setVisible(state)
234123
public void setEditingState(String state) {
		if ("idle".equalsIgnoreCase(state)) {
			delegate.setEditingState(GeometryEditState.IDLE);
		} else if ("dragging".equalsIgnoreCase(state)) {
			delegate.setEditingState(GeometryEditState.DRAGGING);
		} else if ("inserting".equalsIgnoreCase(state)) {
			delegate.setEditingState(GeometryEditState.INSERTING);
		}
	}
160304
def set_impact_state(self):
        
        cls = self.__class__
        if cls.enable_problem_impacts_states_change:
            logger.debug("%s is impacted and goes UNREACHABLE", self)

            # Track the old state (problem occured before a new check)
            self.state_before_impact = self.state
            self.state_id_before_impact = self.state_id
            # This flag will know if we override the impact state
            self.state_changed_since_impact = False
            # Set unreachable
            self.set_unreachable()
343063
void changeState(State state) {

        m_state = state;
        switch (state) {
            case validationRunning:
                m_cancelButton.setEnabled(false);
                m_okButton.setEnabled(false);
                clearValidationError();
                break;
            case validationFailed:
                m_okButton.setEnabled(false);
                m_cancelButton.setEnabled(true);
                break;
            case validationUnknown:
            default:
                m_cancelButton.setEnabled(true);
                m_okButton.setEnabled(true);
                clearValidationError();
                break;

        }
    }
569492
def toggle_state(state)
      @states.select { |s, _| s == state }.each do |s, v|
        v[1] = !v[1]
        classify_state v
      end
    end
1363664
public function is_editable() {
        global $USER;

        if (!$this->is_visible()) {
            return false;
        }

        if ($this->is_signup_field() && (empty($this->userid) || isguestuser($this->userid))) {
            // Allow editing the field on the signup page.
            return true;
        }

        $systemcontext = context_system::instance();

        if ($this->userid == $USER->id && has_capability('moodle/user:editownprofile', $systemcontext)) {
            return true;
        }

        if (has_capability('moodle/user:update', $systemcontext)) {
            return true;
        }

        return false;
    }
55105
public function isEditable() {

		$editable = [ IApproval::STATUS_SUBMITTED, IApproval::STATUS_RE_SUBMIT, IApproval::STATUS_UPLIFT_FREEZE, IApproval::STATUS_UPLIFT_BLOCK ];

		return !in_array( $this->status, $editable );
	}
337898
public boolean set(State state) {
    while (true) {
      InternalState internalState = currentInternalState.get();
      checkState(!internalState.isRead, "State was already read, cannot set state.");
      if (state == internalState.state) {
        return false;
      } else {
        if (!currentInternalState.compareAndSet(
            internalState,
            state == State.ENABLED
                ? InternalState.ENABLED_NOT_READ
                : InternalState.DISABLED_NOT_READ)) {
          // The state was changed between the moment the internalState was read and this point.
          // Some conditions may be not correct, reset at the beginning and recheck all conditions.
          continue;
        }
        return true;
      }
    }
  }
913815
protected void setState(FieldState state) {
        if (DEBUG)
            LOG.debug("{}:{} --> {}", _state, _field != null ? _field : _headerString != null ? _headerString : _string, state);
        _fieldState = state;
    }
973983
def setCurrentState(self, state):
        
        self._currentState = state
        
        palette = self.palette()
        if state == XLineEdit.State.Normal:
            palette = QApplication.instance().palette()
        
        elif state == XLineEdit.State.Failed:
            palette.setColor(palette.Base, QColor('#ffc9bc'))
            palette.setColor(palette.Text, QColor('#aa2200'))
            palette.setColor(palette.Disabled, palette.Text, QColor('#e58570'))
        
        elif state == XLineEdit.State.Passed:
            palette.setColor(palette.Base, QColor('#d1ffd1'))
            palette.setColor(palette.Text, QColor('#00aa00'))
            palette.setColor(palette.Disabled, palette.Text, QColor('#75e575'))
        
        self._hintColor = palette.color(palette.Disabled, palette.Text)
        self.setPalette(palette)