Java/GWT/DockPanel
Версия от 21:01, 31 мая 2010; (обсуждение)
Using DockPanel
<source lang="java">
package com.jexp.gwt.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.ClickListener; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.Widget; import com.google.gwt.user.client.ui.HTML; import com.google.gwt.user.client.ui.DockPanel; public class GWTClient implements EntryPoint{
public void onModuleLoad() { DockPanel dock = new DockPanel(); dock.setHorizontalAlignment(DockPanel.ALIGN_CENTER); HTML north0 = new HTML("This is the first north component", true);HTML east = new HTML("
is
the
east
component
HTML south = new HTML("This is the south component");HTML west = new HTML("
is
the
west
component
HTML north1 = new HTML("This is the second north component", true); dock.add(north0, DockPanel.NORTH); dock.add(east, DockPanel.EAST); dock.add(south, DockPanel.SOUTH); dock.add(west, DockPanel.WEST); dock.add(north1, DockPanel.NORTH); dock.add(new HTML("Center"), DockPanel.CENTER); RootPanel.get().add(dock); }
}
</source>