@ SuppressWarnings ( { "unchecked" , "rawtypes" } ) public void setupLookAndFeel ( PropertyOwner propertyOwner ) { Map < String , Object > properties = null ; if ( propertyOwner == null ) propertyOwner = this . retrieveUserProperties ( Params . SCREEN ) ; if ( propertyOwner == null ) { // Thin only RemoteTask task = ( RemoteTask ) this . getApplication ( ) . getRemoteTask ( null , null , false ) ; if ( task != null ) { try { properties = ( Map ) task . doRemoteAction ( Params . RETRIEVE_USER_PROPERTIES , properties ) ; } catch ( Exception ex ) { ex . printStackTrace ( ) ; } } } String backgroundName = null ; if ( propertyOwner != null ) if ( propertyOwner . getProperty ( Params . BACKGROUNDCOLOR ) != null ) backgroundName = propertyOwner . getProperty ( Params . BACKGROUNDCOLOR ) ; if ( backgroundName == null ) if ( properties != null ) backgroundName = ( String ) properties . get ( Params . BACKGROUNDCOLOR ) ; if ( backgroundName != null ) this . setBackgroundColor ( BaseApplet . nameToColor ( backgroundName ) ) ; Container top = this ; while ( top . getParent ( ) != null ) { top = top . getParent ( ) ; } ScreenUtil . updateLookAndFeel ( top , propertyOwner , properties ) ; }
Get the screen properties and set up the look and feel .