GWT 2.0이 출시되기 전에 기존 패널을 다시 작성하려고합니다. 이 패널에는 VerticalPanel 아래에 몇 개의 텍스트 필드와 스크롤 가능한 패널이 있습니다.GWT 2.0에서 선언적 레이아웃과 프로그래밍 방식 레이아웃을 혼합 할 수 있습니까?
public class ScrollTablePanel extends ResizeComposite{
interface Binder extends UiBinder<Widget, ScrollTablePanel > { }
private static Binder uiBinder = GWT.create(Binder.class);
@UiField FlexTable table1;
@UiField FlexTable table2;
public Test2() {
initWidget(uiBinder.createAndBindUi(this));
table1.setText(0, 0, "testing 1");
table1.setText(0, 1, "testing 2");
table1.setText(0, 2, "testing 3");
table2.setText(0, 0, "testing 1");
table2.setText(0, 1, "testing 2");
table2.setText(0, 2, "testing 3");
table2.setText(1, 0, "testing 4");
table2.setText(1, 1, "testing 5");
table2.setText(1, 2, "testing 6");
}
}
다음 XML :
내가하고 싶은 무엇는 UIBinder로 스크롤 패널을 만든 다음 아래는 VerticalPanel에 그것을 추가 내가 이것을 설명하기 위해 만든 예이다
<ui:UiBinder
xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'
xmlns:mail='urn:import:com.test.scrollpaneltest'>
<g:DockLayoutPanel unit='EM'>
<g:north size="2">
<g:FlexTable ui:field="table1"></g:FlexTable>
</g:north>
<g:center>
<g:ScrollPanel>
<g:FlexTable ui:field="table2"></g:FlexTable>
</g:ScrollPanel>
</g:center>
</g:DockLayoutPanel>
</ui:UiBinder>
그 다음의 EntryPoint에서 같은 것을 할 :
public void onModuleLoad() {
VerticalPanel vp = new VerticalPanel();
vp.add(new ScrollTablePanel());
vp.add(new Label("dummy label text"));
vp.setWidth("100%");
RootLayoutPanel.get().add(vp);
}
을하지만 스크롤을 추가 할 때 TablePanel을 VerticalPanel로 설정하면 첫 번째 FlexTable (test1) 만 전체 ScrollTablePanel이 아닌 페이지에 표시됩니다.
GWT 2.0에서 선언적 레이아웃과 프로그래밍 방식 레이아웃을 혼합 할 수있는 곳에서이 방법을 사용할 수 있습니까?