public final void setHeaderColorStyle ( HeaderColorStyle headerColorStyle ) { this . headerColorStyle = headerColorStyle ; if ( ! headerColorStyle . getColorStyle ( ) . isEmpty ( ) ) { this . getHeaderLabel ( ) . setStyle ( headerColorStyle . getColorStyle ( ) ) ; // It's either DEFAULT or CUSTOM value (all empty values) // If it is DEFAULT, it sets the default style color // Otherwise if it is CUSTOM, by default no style is applied // (default css "generic" color is in play), user has // to manually set it via setCustomHeaderColorStyle(String colorStyle) } else { if ( headerColorStyle == HeaderColorStyle . DEFAULT ) { switch ( this . dialogType ) { case INFORMATION : this . updateHeaderColorStyle ( HeaderColorStyle . GLOSS_INFO ) ; break ; case ERROR : this . updateHeaderColorStyle ( HeaderColorStyle . GLOSS_ERROR ) ; break ; case WARNING : this . updateHeaderColorStyle ( HeaderColorStyle . GLOSS_WARNING ) ; break ; case CONFIRMATION : this . updateHeaderColorStyle ( HeaderColorStyle . GLOSS_CONFIRM ) ; break ; case CONFIRMATION_ALT1 : this . updateHeaderColorStyle ( HeaderColorStyle . GLOSS_CONFIRM ) ; break ; case CONFIRMATION_ALT2 : this . updateHeaderColorStyle ( HeaderColorStyle . GLOSS_CONFIRM ) ; break ; case EXCEPTION : this . updateHeaderColorStyle ( HeaderColorStyle . GLOSS_EXCEPTION ) ; break ; case INPUT_TEXT : this . updateHeaderColorStyle ( HeaderColorStyle . GLOSS_INPUT ) ; break ; default : this . updateHeaderColorStyle ( HeaderColorStyle . GENERIC ) ; break ; } } } }
Applies a predefined JavaFX CSS background color style for the header label