public void setSampleStyle ( ) { Color colorBackground = ScreenUtil . getColor ( ScreenUtil . BACKGROUND_COLOR , null , properties ) ; Color colorControl = ScreenUtil . getColor ( ScreenUtil . CONTROL_COLOR , null , properties ) ; Color colorText = ScreenUtil . getColor ( ScreenUtil . TEXT_COLOR , null , properties ) ; samplePanel . setBackground ( colorBackground ) ; if ( colorBackground == null ) samplePanel . setBackground ( SystemColor . window ) ; Font font = ScreenUtil . getFont ( null , properties , true ) ; sampleLabel . setFont ( font ) ; sampleTextField . setFont ( font ) ; sampleTextField . setBackground ( colorControl ) ; if ( colorControl == null ) sampleTextField . setBackground ( SystemColor . text ) ; sampleLabel . setForeground ( colorText ) ; if ( colorText == null ) sampleLabel . setForeground ( SystemColor . textText ) ; sampleTextField . setForeground ( colorText ) ; if ( colorText == null ) sampleTextField . setForeground ( SystemColor . textText ) ; if ( colorBackground != null ) backgroundButton . setBackground ( colorBackground ) ; if ( colorControl != null ) controlColorButton . setBackground ( colorControl ) ; if ( colorText != null ) textColorButton . setBackground ( colorText ) ; this . invalidate ( ) ; }
Handle the button actions .