Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How to change background style when loading home page(RAP 2.3.2)
How to change background style when loading home page [message #1752757] Thu, 26 January 2017 21:57 Go to next message
Tass Burrfoot is currently offline Tass BurrfootFriend
Messages: 19
Registered: April 2015
Junior Member

The following code is taken from the RAP Example demo application

public void configure( Application application ) {
    Map<String, String> properties = new HashMap<String, String>();
    properties.put( WebClient.PAGE_TITLE, "RAP Examples" );
    properties.put( WebClient.BODY_HTML, readTextFromResource( "resources/body.html", "UTF-8" ) );
    properties.put( WebClient.HEAD_HTML, readTextFromResource( "resources/head.html", "UTF-8" ) );
    properties.put( WebClient.FAVICON, "icons/favicon.png" );
    application.setOperationMode( OperationMode.SWT_COMPATIBILITY );
    application.addEntryPoint( "/", MainUi.class, properties );
    application.addStyleSheet( RWT.DEFAULT_THEME_ID, "theme/theme.css" );
    application.addResource( "icons/favicon.png", createResourceLoader( "icons/favicon.png" ) );
    application.addResource( "icons/loading.gif", createResourceLoader( "icons/loading.gif" ) );
    registerClientScriptingResources( application );

This generates the following background color and dynamic gif when home page is loading:

Is there any way to change the gray like background color? I tried to set custom theme in EntryPoint.createShell(Display) like this

	protected Shell createShell(Display display) {
		Shell shell = super.createShell(display);
		shell.setData(RWT.CUSTOM_VARIANT, "application");
		return shell;

That's not working. I tried to set the theme on the display object and it is not working either. What is the correct way to handle this? Thanks
Re: How to change background style when loading home page [message #1752772 is a reply to message #1752757] Fri, 27 January 2017 07:42 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2359
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
the gray background is themeable. See [1] -> Display#background-image.


Previous Topic:Sending Data to RAP Application
Next Topic:Eclipse RAP - UI-Session vs Http-Session
Goto Forum:

Current Time: Sat Nov 27 15:31:06 GMT 2021

Powered by FUDForum. Page generated in 0.01741 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top