Set/Get the status of the button.
166891
def status(self, s=None):
        
        if s is None:
            return self.states[self._status]
        if isinstance(s, str):
            s = self.states.index(s)
        self._status = s
        self.textproperty.SetLineOffset(self.offset)
        self.actor.SetInput(self.spacer + self.states[s] + self.spacer)
        s = s % len(self.colors)  # to avoid mismatch
        self.textproperty.SetColor(colors.getColor(self.colors[s]))
        bcc = numpy.array(colors.getColor(self.bcolors[s]))
        self.textproperty.SetBackgroundColor(bcc)
        if self.showframe:
            self.textproperty.FrameOn()
            self.textproperty.SetFrameWidth(self.framewidth)
            self.textproperty.SetFrameColor(numpy.sqrt(bcc))
1366602
def switch_on(self):
        """"""
        success = self.set_status(CONST.STATUS_ON_INT)

        if success:
            self._json_state['status'] = CONST.STATUS_ON

        return success
730264
def update_status(self, value, value_set):
        """"""
        self._status = value
        self._status_set = value_set
        self.repaint()
        self.update()
230715
private void processCommonFilterStatus(final TargetUpdateStatus status, final boolean buttonPressed) {
        if (buttonPressed) {
            buttonClicked.addStyleName(BTN_CLICKED);
            managementUIState.getTargetTableFilters().getClickedStatusTargetTags().add(status);
            eventBus.publish(this, TargetFilterEvent.FILTER_BY_STATUS);

        } else {
            buttonClicked.removeStyleName(BTN_CLICKED);
            managementUIState.getTargetTableFilters().getClickedStatusTargetTags().remove(status);
            eventBus.publish(this, TargetFilterEvent.REMOVE_FILTER_BY_STATUS);
        }

    }
1246725
def set_status(self, name, status):
        
        getattr(self.system, name).status = status
        return True
147808
private Integer getButtonPriority(Integer button){
        switch (button){
            case Dialog.BUTTON_POSITIVE:
                return 1;
            case Dialog.BUTTON_NEUTRAL:
                return 2;
            case Dialog.BUTTON_NEGATIVE:
                return 3;
            default:
                return 0;
        }
    }
1236399
protected void onChange()
	{
		enabled = false;
		if (getDocument().getLength() > 0)
		{
			enabled = true;
		}
		buttonModel.setEnabled(enabled);
	}
565142
def OnUpdate(self, event):
        """"""

        attributes = event.attr

        self._update_buttoncell(attributes["button_cell"])

        self.Refresh()

        event.Skip()
1001344
def status(self, value):
        """"""
        if value is not None:
            if not isinstance(value, QueryStatusType):
                raise AttributeError("%s action type is invalid in mdsol:Query." % (value,))
        self._status = value
1290310
function () {
    var buttonState;
    var controller = this.controller;
    var id;

    if (!controller) { return; }

    // Check every button.
    for (id = 0; id < controller.buttons.length; ++id) {
      // Initialize button state.
      if (!this.buttonStates[id]) {
        this.buttonStates[id] = {pressed: false, touched: false, value: 0};
      }
      if (!this.buttonEventDetails[id]) {
        this.buttonEventDetails[id] = {id: id, state: this.buttonStates[id]};
      }

      buttonState = controller.buttons[id];
      this.handleButton(id, buttonState);
    }
    // Check axes.
    this.handleAxes();
  }
835088
def setEnabled(self, state):
        
        super(XToolButton, self).setEnabled(state)
        
        self.updateUi()
462746
def on_state(self, *args):
        """"""
        # This really ought to be done with the selection behavior
        if self.state == 'down':
            self.rulesview.rule = self.rule
            for button in self.ruleslist.children[0].children:
                if button != self:
                    button.state = 'normal'
243928
def set_status(self, name, text='', row=0, fg='black', bg='white'):
        ''''''
        if self.is_alive():
            self.parent_pipe_send.send(Value(name, text, row, fg, bg))
63307
def do_status(self, arg):
        '''  '''
        info = self.arm.get_info()
        max_len = len(max(info.keys(), key=len))

        print(self.style.theme('\nArm Status'))
        for key, value in info.items():
            print(self.style.help(key.ljust(max_len + 2), str(value)))
        print()
174516
def process_status(ctx, param, value):
    """"""
    from .models import PIDStatus

    # Allow empty status
    if value is None:
        return None

    if not hasattr(PIDStatus, value):
        raise click.BadParameter('Status needs to be one of {0}.'.format(
            ', '.join([s.name for s in PIDStatus])
        ))
    return getattr(PIDStatus, value)
957966
def status(cls):
        """"""
        return cls.json_get('%s/status' % cls.api_url, empty_key=True,
                            send_key=False)
456574
def set_status(self, enabled):
        """"""
        self.__manual_update_time = time.time()
        if enabled:
            data = self._controller.command(self._id,
                                            'auto_conditioning_start',
                                            wake_if_asleep=True)
            if data['response']['result']:
                self.__is_auto_conditioning_on = True
                self.__is_climate_on = True
        else:
            data = self._controller.command(self._id,
                                            'auto_conditioning_stop',
                                            wake_if_asleep=True)
            if data['response']['result']:
                self.__is_auto_conditioning_on = False
                self.__is_climate_on = False
        self.update()