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 .