PDA

View Full Version : Theme does not apply when running standalone



sz_146
18 Feb 2009, 3:16 AM
I am using the following class to launch my application and when I run it in Eclipse, it displays in the GRAY theme fine. But when I click the Compile/Brwose button and it loads in browser, it shows the default theme.



package com.docobo.gwt.sample.layouttest.client;

import com.extjs.gxt.ui.client.GXT;
import com.extjs.gxt.ui.client.util.Theme;
import com.extjs.gxt.ui.client.widget.Viewport;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;

/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class LayoutTest implements EntryPoint {

private Viewport vp = new Viewport();

/**
* This is the entry point method.
*/

public void onModuleLoad() {
GXT.setDefaultTheme(Theme.GRAY, true);
GXT.BLANK_IMAGE_URL = "images/s.gif";
vp.setLayout(new FitLayout());
vp.add(new MainBorderLayout());
vp.layout();

RootPanel.get().add(vp);

}
}