GWT:无法从 DockLayoutPanel 转换为 Composite
首先,我理解这意味着什么:DockLayoutPanel 不会扩展任何进而扩展 Composite 的类。我只是不知道如何解决它。
我有一个类 Mapmaker2.java,它是我整个应用程序的主要用户界面。基础是 DockLayoutPanel,它又包含 VerticalPanel、StackLayoutPanel 等。由于这是一个 MVP 应用程序,我不希望使用 uibinder 模板来标记我的 EntryPoint 类。
这是 java 类:
public class MapmakerView2 extends Composite {
@UiTemplate("MapmakerView2.ui.xml")
interface Binder extends UiBinder<Composite, MapmakerView2> {}
private static Binder binder = GWT.create(Binder.class);
@UiField StackLayoutPanel interfaceStack;
public MapmakerView2() {
initWidget(binder.createAndBindUi(this));
}
}
这是 uibinder 模板:
<ui:UiBinder> <!-- snipped out xmlns stuff -->
<g:DockLayoutPanel unit="PX">
<g:north size="100">
<g:VerticalPanel>
<!-- Logo -->
<!-- Login Link -->
</g:VerticalPanel>
</g:north>
<g:west size="150">
<g:StackLayoutPanel ui:field="interfaceStack" styleName="{style.shortcuts}" unit="PX">
<g:stack>
<g:header size="10">
<b>Features</b>
</g:header>
<mapmaker:FeaturesForm/>
</g:stack>
<g:stack size="10">
<g:header size="10">
<b>Export</b>
</g:header>
<mapmaker:ExportForm/>
</g:stack>
<g:stack>
<g:header size="10">
<b>Admin</b>
</g:header>
<mapmaker:AdminForm/>
</g:stack>
<g:stack>
<g:header size="10">
<b>Help</b>
</g:header>
<mapmaker:HelpForm/>
</g:stack>
</g:StackLayoutPanel>
</g:west>
<g:center>
<!-- Display Map Here -->
<mapmaker:MapBox/>
</g:center>
<g:south size="100">
<!-- Display i18n disclaimer stuff here -->
<mapmaker:Disclaimer/>
</g:south>
</g:DockLayoutPanel>
</ui:UiBinder>
有人可以帮忙吗?
First, I understand what this means: DockLayoutPanel does not extend any class that in turn extends Composite. I just don't know how to fix it.
I have a class, Mapmaker2.java, which is the primary user interface for my entire application. The base is a DockLayoutPanel, which in turn contains VerticalPanels, StackLayoutPanels, etc. Since this is an MVP application, I'd prefer not to mark up my EntryPoint class with a uibinder template.
Here is the java class:
public class MapmakerView2 extends Composite {
@UiTemplate("MapmakerView2.ui.xml")
interface Binder extends UiBinder<Composite, MapmakerView2> {}
private static Binder binder = GWT.create(Binder.class);
@UiField StackLayoutPanel interfaceStack;
public MapmakerView2() {
initWidget(binder.createAndBindUi(this));
}
}
And here is the uibinder template:
<ui:UiBinder> <!-- snipped out xmlns stuff -->
<g:DockLayoutPanel unit="PX">
<g:north size="100">
<g:VerticalPanel>
<!-- Logo -->
<!-- Login Link -->
</g:VerticalPanel>
</g:north>
<g:west size="150">
<g:StackLayoutPanel ui:field="interfaceStack" styleName="{style.shortcuts}" unit="PX">
<g:stack>
<g:header size="10">
<b>Features</b>
</g:header>
<mapmaker:FeaturesForm/>
</g:stack>
<g:stack size="10">
<g:header size="10">
<b>Export</b>
</g:header>
<mapmaker:ExportForm/>
</g:stack>
<g:stack>
<g:header size="10">
<b>Admin</b>
</g:header>
<mapmaker:AdminForm/>
</g:stack>
<g:stack>
<g:header size="10">
<b>Help</b>
</g:header>
<mapmaker:HelpForm/>
</g:stack>
</g:StackLayoutPanel>
</g:west>
<g:center>
<!-- Display Map Here -->
<mapmaker:MapBox/>
</g:center>
<g:south size="100">
<!-- Display i18n disclaimer stuff here -->
<mapmaker:Disclaimer/>
</g:south>
</g:DockLayoutPanel>
</ui:UiBinder>
Can anyone assist?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需替换
为
或
Just replace
with
or