/** * 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 */ public void setLedBlinking(final boolean LED_BLINKING) { if (ledBlinking == LED_BLINKING) {return;} ledBlinking = LED_BLINKING; if (LED_BLINKING) { LED_BLINKING_TIMER.start(); } else { setCurrentLedImage(getLedImageOff()); LED_BLINKING_TIMER.stop(); } }
/** * 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 */ public void setLedBlinking(final boolean LED_BLINKING) { if (ledBlinking == LED_BLINKING) {return;} ledBlinking = LED_BLINKING; if (LED_BLINKING) { LED_BLINKING_TIMER.start(); } else { setCurrentLedImage(getLedImageOff()); LED_BLINKING_TIMER.stop(); } }
@Override public void actionPerformed(ActionEvent event) { if (event.getSource().equals(LED_BLINKING_TIMER)) { currentLedImage = ledOn == true ? getLedImageOn() : getLedImageOff(); ledOn ^= true; repaint(); } } // </editor-fold>
@Override public void actionPerformed(ActionEvent event) { if (event.getSource().equals(LED_BLINKING_TIMER)) { currentLedImage = ledOn == true ? getLedImageOn() : getLedImageOff(); ledOn ^= true; repaint(); } } // </editor-fold>