1
我試圖使用自定義樣式,如下所示(https://code.google.com/p/mgwt/wiki/Styling):mgwt定製造型
public class MGWTColorTheme implements MGWTTheme {
private MGWTClientBundle bundle;
public MGWTColorTheme() {
if (MGWT.getOsDetection().isIOs()) {
if (MGWT.getOsDetection().isRetina()) {
bundle = (MGWTColorBundleRetina) GWT.create(MGWTColorBundleRetina.class);
} else {
bundle = (MGWTColorBundleNonRetina) GWT.create(MGWTColorBundleNonRetina.class);
}
} else {
bundle = (MGWTColorBundleNonRetina) GWT.create(MGWTColorBundleNonRetina.class);
}
}
@Override
public MGWTClientBundle getMGWTClientBundle() {
return bundle;
}
}
和
MGWTStyle.setTheme(new MGWTColorTheme());
當我打開我的應用程序,我得到以下錯誤:
Rebinding com.googlecode.mgwt.ui.client.theme.mgwt.MGWTColorBundleNonRetina
Invoking generator com.google.gwt.resources.rebind.context.InlineClientBundleGenerator
Creating assignment for getButtonBarCss()
Replacing CSS class names
The following unobfuscated classes were present in a strict CssResource:
text
Fix by adding String accessor method(s) to the CssResource interface for obfuscated classes, or using an @external declaration for unobfuscated classes.