private void updateStyle ( ) { CaptionStyle cs = captionStyle == null ? CaptionStyle . HIDDEN : captionStyle ; String background = null ; switch ( cs ) { case FRAME : break ; case TITLE : break ; case LEFT : background = getGradValue ( color1 , color2 ) ; break ; case RIGHT : background = getGradValue ( color2 , color1 ) ; break ; case CENTER : background = getGradValue ( color1 , color2 , color1 ) ; break ; } panel . addClass ( "sharedForms-captioned sharedForms-captioned-caption-" + cs . name ( ) . toLowerCase ( ) ) ; String css = "##{id}-titlebar " ; if ( cs == CaptionStyle . HIDDEN ) { css += "{display:none}" ; } else { css += "{background: " + background + "}" ; } panel . setCss ( css ) ; }
Update styles by current caption style setting .