/** * Sets the color that will be used to calculate the custom led color * @param COLOR */ public void setCustomLedColor(final Color COLOR) { if (customLedColor.COLOR.equals(COLOR)) {return;} customLedColor = new CustomLedColor(COLOR); 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(); }
/** * Sets the color that will be used to calculate the custom led color * @param COLOR */ public void setCustomLedColor(final Color COLOR) { if (customLedColor.COLOR.equals(COLOR)) {return;} customLedColor = new CustomLedColor(COLOR); 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(); }
/** * Sets the type of LED. * @param LED_TYPE Possible values are ROUND, RECT_VERTICAL and RECT_HORIZONTAL */ 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(); }
/** * Sets the type of LED. * @param LED_TYPE Possible values are ROUND, RECT_VERTICAL and RECT_HORIZONTAL */ 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(); }
/** * Sets the color of the threshold led. * The LedColor is not a standard color but defines a * color scheme for the led. The default ledcolor is RED * @param LED_COLOR */ public void setLedColor(final LedColor LED_COLOR) { if (ledColor == LED_COLOR) {return;} if (LED_COLOR == null) { ledColor = LedColor.RED_LED; } else { ledColor = LED_COLOR; } final boolean LED_WAS_ON = currentLedImage.equals(ledImageOn) ? true : false; flushImages(); ledImageOff = create_LED_Image(getWidth(), 0, LED_COLOR, ledType); ledImageOn = create_LED_Image(getWidth(), 1, LED_COLOR, ledType); currentLedImage = LED_WAS_ON == true ? ledImageOn : ledImageOff; repaint(); }
/** * Sets the color of the threshold led. * The LedColor is not a standard color but defines a * color scheme for the led. The default ledcolor is RED * @param LED_COLOR */ public void setLedColor(final LedColor LED_COLOR) { if (ledColor == LED_COLOR) {return;} if (LED_COLOR == null) { ledColor = LedColor.RED_LED; } else { ledColor = LED_COLOR; } final boolean LED_WAS_ON = currentLedImage.equals(ledImageOn) ? true : false; flushImages(); ledImageOff = create_LED_Image(getWidth(), 0, LED_COLOR, ledType); ledImageOn = create_LED_Image(getWidth(), 1, LED_COLOR, ledType); currentLedImage = LED_WAS_ON == true ? ledImageOn : ledImageOff; repaint(); }