Java GWT:SplitLayoutPanel UiBinder
我也有类似的问题 有没有办法重写onResize方法并在uibinder中使用它Java GWT:SplitLayoutPanel UiBinder,java,gwt,resize,uibinder,Java,Gwt,Resize,Uibinder,我也有类似的问题 有没有办法重写onResize方法并在uibinder中使用它 SplitLayoutPanel mainPanel = new SplitLayoutPanel() { @Override public void onResize() { super.onResize(); //some other resizing stuff } }; 对。定义类: package com.foo; publ
SplitLayoutPanel mainPanel = new SplitLayoutPanel() {
@Override
public void onResize() {
super.onResize();
//some other resizing stuff
}
};
对。定义类:
package com.foo;
public class MySplitLayoutPanel extends SplitLayoutPanel() {
@Override
public void onResize() {
super.onResize();
//some other resizing stuff
}
};
然后将类所在的包绑定到您选择的xml名称空间(与UiBinder
模板中定义的其他名称空间不冲突):
这是针对UiBinder
部分的,但我认为您链接的答案根本不是解决方案,因为当浏览器窗口调整大小时,onResize()
也将被调用(主要是)
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'
xmlns:foo='urn:import:com.foo'>
<foo:MySplitLayoutPanel />