Capture a change to the LED for this button.
433059
def led_changed(self, addr, group, val):
        """"""
        _LOGGER.debug("Button %d LED changed from %d to %d",
                      self._group, self._value, val)
        led_on = bool(val)
        if led_on != bool(self._value):
            self._update_subscribers(int(led_on))
1329132
def _button_plus_clicked(self, n):
        
        self._button_save.setEnabled(True)

        self.insert_colorpoint(self._colorpoint_list[n][0],
                               self._colorpoint_list[n][1],
                               self._colorpoint_list[n][2])
        self._build_gui()
448952
def focusOutEvent(self, event):
        """"""
        self.focus_changed.emit()
        return super(ControlWidget, self).focusOutEvent(event)
1256339
def handleButtonClick(self, button):
        
        if ( self.signalsBlocked() ):
            return
        
        if ( button == self._buttonBox.button(QDialogButtonBox.Reset) ):
            self.resetRequested.emit()
        
        self.buttonClicked.emit(button)
304091
def addChanged(self):
        
        if self.addWidget.currentIndex() == 0:
            return
        typ = asUnicode(self.addWidget.currentText())
        self.param.addNew(typ)
        self.addWidget.setCurrentIndex(0)
698580
public void onShareButtonClicked() {
    List<Trace> tracesToShare = new LinkedList<Trace>(traceBuffer.getTraces());
    String plainTraces = generatePlainTracesToShare(tracesToShare);
    if (!view.shareTraces(plainTraces)) {
      view.notifyShareTracesFailed();
    }
  }
327327
def _transition_callback(self, is_on, transition):
        
        # Update state properties
        if transition.state_stages:
            state = transition.state_stages[transition.stage_index]
            if self.is_on and is_on is False:
                # If led was turned off, set brightness to initial value
                # so that the brightness is restored when it is turned on again
                state['brightness'] = self.brightness
            self.set(is_on=is_on, cancel_transition=False, **state)

        self._active_transition = None
95900
def _set_led_value(self, group, val):
        """"""
        new_bitmask = set_bit(self._value, group, bool(val))
        self._set_led_bitmask(new_bitmask)
985585
def toggle(self, event):
        """"""

        if self.state < len(self.bitmap_list) - 1:
            self.state += 1
        else:
            self.state = 0

        self.SetBitmapLabel(self.bitmap_list[self.state])

        try:
            event.Skip()
        except AttributeError:
            pass

        """For compatibility with toggle buttons"""
        setattr(self, "GetToolState", lambda x: self.state)
735011
def _on_wid_changed(self, wid):
        """"""
        if self._itsme: return
        self.update_model(self._get_idx_from_widget(wid))
        return
776354
def _slider_changed(self, n):
        
        self._button_save.setEnabled(True)

        self.modify_colorpoint(n, self._sliders[n].value()*0.001, self._colorpoint_list[n][1], self._colorpoint_list[n][2])
1236399
protected void onChange()
	{
		enabled = false;
		if (getDocument().getLength() > 0)
		{
			enabled = true;
		}
		buttonModel.setEnabled(enabled);
	}
1235866
public void onChange(Widget widget) {

        if (widget == m_tbHexColor) {
            try {
                CmsColor color = new CmsColor();
                color.setHex(m_tbHexColor.getText());
                m_tbHue.setText(Integer.toString(color.getHue()));
                m_tbSaturation.setText(Integer.toString(color.getSaturation()));
                m_tbBrightness.setText(Integer.toString(color.getValue()));
                m_tbRed.setText(Integer.toString(color.getRed()));
                m_tbGreen.setText(Integer.toString(color.getGreen()));
                m_tbBlue.setText(Integer.toString(color.getBlue()));
                m_tbHexColor.setText(color.getHex());
                setPreview(color.getHex());
            } catch (Exception e) {
                // do something.
            }
        }

        if ((widget == m_tbRed) || (widget == m_tbGreen) || (widget == m_tbBlue)) {
            // Don't allow this value to overflow or underflow
            try {
                if (Integer.parseInt(((TextBox)widget).getText()) > 255) {
                    ((TextBox)widget).setText("255");
                }
                if (Integer.parseInt(((TextBox)widget).getText()) < 0) {
                    ((TextBox)widget).setText("0");
                }
            } catch (Exception e) {
                // do something.
            }

            m_red = Integer.parseInt(m_tbRed.getText());
            m_green = Integer.parseInt(m_tbGreen.getText());
            m_blue = Integer.parseInt(m_tbBlue.getText());
            m_hue = Integer.parseInt(m_tbHue.getText());
            m_saturation = Integer.parseInt(m_tbSaturation.getText());
            m_brightness = Integer.parseInt(m_tbBrightness.getText());

            try {
                CmsColor color = new CmsColor();
                color.setRGB(m_red, m_green, m_blue);
                m_tbHue.setText(Integer.toString(color.getHue()));
                m_tbSaturation.setText(Integer.toString(color.getSaturation()));
                m_tbBrightness.setText(Integer.toString(color.getValue()));
                m_tbHexColor.setText(color.getHex());
                setPreview(color.getHex());
            } catch (Exception e) {
                // do something.
            }
        } else if ((widget == m_tbHue) || (widget == m_tbSaturation) || (widget == m_tbBrightness)) {
            try {
                if (Integer.parseInt(m_tbHue.getText()) > 359) {
                    m_tbHue.setText("359");
                }

                if (Integer.parseInt(m_tbSaturation.getText()) > 100) {
                    m_tbSaturation.setText("100");
                }

                if (Integer.parseInt(m_tbBrightness.getText()) > 100) {
                    m_tbBrightness.setText("100");
                }
            } catch (Exception e) {
                // do something.
            }

            m_red = Integer.parseInt(m_tbRed.getText());
            m_green = Integer.parseInt(m_tbGreen.getText());
            m_blue = Integer.parseInt(m_tbBlue.getText());
            m_hue = Integer.parseInt(m_tbHue.getText());
            m_saturation = Integer.parseInt(m_tbSaturation.getText());
            m_brightness = Integer.parseInt(m_tbBrightness.getText());

            // Figure out colors
            try {
                CmsColor color = new CmsColor();
                color.setHSV(m_hue, m_saturation, m_brightness);
                m_tbRed.setText(Integer.toString(color.getRed()));
                m_tbGreen.setText(Integer.toString(color.getGreen()));
                m_tbBlue.setText(Integer.toString(color.getBlue()));
                m_tbHexColor.setText(color.getHex());
                setPreview(color.getHex());
            } catch (Exception e) {
                // do something.
            }
        }

        // Let the sliders know something's changed
        updateSliders();
    }
997971
def on_widget__button_press_event(self, widget, event):
        '''
        
        '''
        if self.mode == 'register_video' and event.button == 1:
            self.start_event = event.copy()
            return
        elif self.mode == 'control':
            shape = self.canvas.find_shape(event.x, event.y)

            if shape is None: return
            state = event.get_state()
            if event.button == 1:
                # Start a new route.
                self._route = Route(self.device)
                self._route.append(shape)
                self.last_pressed = shape
                if not (state & gtk.gdk.MOD1_MASK):
                    # `<Alt>` key is not held down.
                    self.emit('route-electrode-added', shape)
1047888
def OnButtonCell(self, event):
        """"""

        if self.button_cell_button_id == event.GetId():
            if event.IsChecked():
                label = self._get_button_label()
                post_command_event(self, self.ButtonCellMsg, text=label)
            else:
                post_command_event(self, self.ButtonCellMsg, text=False)

        event.Skip()
357524
private void adaptButtonTextColor() {
        if (backButton != null) {
            backButton.setTextColor(buttonTextColor);
        }

        if (nextButton != null) {
            nextButton.setTextColor(buttonTextColor);
        }

        if (finishButton != null) {
            finishButton.setTextColor(buttonTextColor);
        }
    }
425012
private void adaptButtonBarVisibility() {
        if (buttonBarContainer != null) {
            buttonBarContainer.setVisibility(buttonBarShown ? View.VISIBLE : View.GONE);
        }
    }