1

我正在尝试使用此处显示的自定义样式(https://code.google.com/p/mgwt/wiki/Styling):

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.
4

1 回答 1

3

看起来您正在使用一个损坏的主题,该主题的 css 文件中存在未在 java 接口中声明的 css 类。

如果您想开始使用 mgwt 样式,您可以轻松克隆主题库项目并从那里开始:

https://code.google.com/p/mgwt/source/checkout?repo=themebase

于 2013-03-24T21:09:30.377 回答