Sets the state of the threshold led.
The led could blink which will be triggered by a javax.swing.Timer
that triggers every 500 ms. The blinking will be done by switching
between two images.
@param LED_BLINKING
484168
public void setLedBlinking(final boolean LED_BLINKING) {
        ledBlinking = LED_BLINKING;
        if (LED_BLINKING) {
            LED_BLINKING_TIMER.start();
        } else {
            setCurrentLedImage(getLedImageOff());
            LED_BLINKING_TIMER.stop();
        }
    }
846035
def state(self, new_state: bool):
    
    self._lutron.send(Lutron.OP_EXECUTE, Keypad._CMD_TYPE, self._keypad.id,
                      self.component_number, Led._ACTION_LED_STATE,
                      int(new_state))
    self._state = new_state
1065654
public void setThreshold(final double THRESHOLD) {
        originalThreshold = THRESHOLD;
        if (null == threshold) {
            _threshold = clamp(getMinValue(), getMaxValue(), THRESHOLD);
            fireTileEvent(RESIZE_EVENT);
        } else {
            threshold.set(THRESHOLD);
        }
    }
843067
public void setThreshold(final double THRESHOLD) {
        if (Double.compare(THRESHOLD, minValue) >= 0 && Double.compare(THRESHOLD, maxValue) <= 0) {
            threshold = THRESHOLD;
        } else {
            if (THRESHOLD < niceMinValue) {
                threshold = niceMinValue;
            }

            if (THRESHOLD > niceMaxValue) {
                threshold = niceMaxValue;
            }
        }
        fireStateChanged();
    }
518323
@Override
    public void setEnabled(boolean enabled) {
        if (this.enabled != enabled) {
            this.enabled = enabled;
            setProperty("enabled", Boolean.toString(enabled));
            if (enabled && getAlertThreshold() == AlertThreshold.OFF) {
                setAlertThreshold(AlertThreshold.DEFAULT);
            }
        }
    }
1367781
public void setLedType(final LedType LED_TYPE) {
        if (ledType == LED_TYPE) {return;}

        ledType = LED_TYPE;
        final boolean LED_WAS_ON = currentLedImage.equals(ledImageOn) ? true : false;
        flushImages();
        ledImageOff = create_LED_Image(getWidth(), 0, ledColor, ledType);
        ledImageOn = create_LED_Image(getWidth(), 1, ledColor, ledType);

        currentLedImage = LED_WAS_ON == true ? ledImageOn : ledImageOff;

        repaint();
    }
515974
public void setThresholdVisible(final boolean VISIBLE) {
        if (null == thresholdVisible) {
            _thresholdVisible = VISIBLE;
            fireTileEvent(VISIBILITY_EVENT);
        } else {
            thresholdVisible.set(VISIBLE);
        }
    }
6135
public void setThreshold(final Level level) {
        Level oldValue = this.thresholdLevel;
        thresholdLevel = level;
        firePropertyChange("threshold", oldValue, this.thresholdLevel);
    }
437962
public void setUserDetectorThreshold(int threshold) {
        String minPriority = ProjectFilterSettings.getIntPriorityAsString(threshold);
        filterSettings.setMinPriority(minPriority);
    }
171310
public void setStartFromZero(final boolean IS_TRUE) {
        if (null == startFromZero) {
            _startFromZero = IS_TRUE;
            //setValue(IS_TRUE && getMinValue() < 0 ? 0 : getMinValue());
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            startFromZero.set(IS_TRUE);
        }
    }
1077287
def setCurrent(self, state=True):
        
        if self._current == state:
            return False
        
        widget = self.viewWidget()
        if widget:
            for other in widget.findChildren(type(self)):
                if other.isCurrent():
                    other._current = False
                    if not other.signalsBlocked():
                        other.currentStateChanged.emit(state)
                        other.deactivated.emit()
        
        self._current = state
        
        if not self.signalsBlocked():
            self.currentStateChanged.emit(state)
            if state:
                self.activated.emit()
            else:
                self.deactivated.emit()
        return True
1317801
private synchronized void setState(int state) {
        mState = state;

        // Give the new state to the Handler so the UI Activity can update
        mHandler.obtainMessage(ISOBlueDemo.MESSAGE_STATE_CHANGE, state, -1)
                .sendToTarget();
    }
809514
@Override
    public void setManual() {
      this.threshold = 1.5f; // this threshold can never be reached
      this.extension = Long.MAX_VALUE;
      this.replQueueThreshold = 1.5f; // can never be reached
      this.reached = -1;
      enter();
      reportStatus("STATE* Safe mode is ON.", true);
    }
293088
def blink(self, state=True):
        
        if self._blinking == state:
            return True
        elif not self.graphicsEffect():
            return False
        else:
            self._blinking = state
            if state:
                self.startTimer(self.blinkInterval())
1157252
def set_flashing(self, duration, hsv1, hsv2):
        """"""
        self.set_transition_time(100)
        for step in range(0, int(duration/2)):
            self.set_color_hsv(hsv1[0], hsv1[1], hsv1[2])
            time.sleep(1)
            self.set_color_hsv(hsv2[0], hsv2[1], hsv2[2])
            time.sleep(1)
842968
public void setRedBlinking(final boolean RED_BLINKING) {
        redBlinking = RED_BLINKING;
        if (!RED_BLINKING) {
            redOn = false;
            TIMER.stop();
        } else {
            TIMER.start();
        }
    }
1325372
public void setLedOn(final boolean ON) {
        if (null == ledOn) {
            _ledOn = ON;
            fireUpdateEvent(LED_EVENT);
        } else {
            ledOn.set(ON);
        }
    }