本文整理汇总了Java中com.google.gwt.user.client.ui.DockPanel.setWidth方法的典型用法代码示例。如果您正苦于以下问题:Java DockPanel.setWidth方法的具体用法?Java DockPanel.setWidth怎么用?Java DockPanel.setWidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.DockPanel
的用法示例。
在下文中一共展示了DockPanel.setWidth方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makeNorth
import com.google.gwt.user.client.ui.DockPanel; //导入方法依赖的package包/类
protected Widget makeNorth() {
AbsolutePanel l = new AbsolutePanel();
DockPanel dlp = new DockPanel();
// final Image sep = new Image("images/glow_bottom_center.gif");
// dlp.add(sep, DockPanel.SOUTH);
// GwtUtil.setStyles(sep, "width", "100%", "height", "5px");
// dlp.add(getSmallIcon().getDisplay(), DockPanel.EAST);
// dlp.add(getSmallIcon2().getDisplay(), DockPanel.WEST);
dlp.add(l, DockPanel.CENTER);
dlp.setCellWidth(l, "100%");
dlp.setCellHeight(l, "37px");
dlp.setWidth("100%");
// dlp.setCellWidth(getSmallIcon().getDisplay(), "160px");
dlp.setStyleName("menu-bar");
getMenu().getDisplay().addStyleName("menu-bar");
GwtUtil.setStyles(l, "width", "100%", "height", "5px", "overflow", "visible");
l.add(getMenu().getDisplay(), 0, 10);
// DeferredCommand.addCommand(new Command(){
// public void execute() {
// int offset = BrowserUtil.isBrowser(Browser.FIREFOX) ? 8 : 11;
// RootPanel.get().add(getMenu().getDisplay(), l.getAbsoluteLeft(), l.getAbsoluteTop()+offset);
// }
// });
return dlp;
}
示例2: setMainScreen
import com.google.gwt.user.client.ui.DockPanel; //导入方法依赖的package包/类
public void setMainScreen(GWT_CiBean account) {
this.account = account;
getHeaderScreen().setWidth("100%");
DockPanel outer = new DockPanel();
BaseScreen header = getHeaderScreen();
if (header instanceof HeaderScreen) {
((HeaderScreen)header).setAccount(account);
}
outer.add(header, DockPanel.NORTH);
//outer.add(getNavigationScreen()), DockPanel.WEST);
//outer.add(getMainPanel(), DockPanel.CENTER);
//navigationScroll = new ScrollPanel(getNavigationScreen());
//mainPanelScroll = new ScrollPanel(getMainPanel());
//navigationScroll.setAlwaysShowScrollBars(true);
//mainPanelScroll.setAlwaysShowScrollBars(true);
centerSplit = new HorizontalSplitPanel();
centerSplit.setLeftWidget(getNavigationScreen());
centerSplit.setRightWidget(getMainPanel());
getMainPanel().setStyleName("mdv-form");
centerSplit.setSplitPosition("35%");
//outer.add(navigationScroll, DockPanel.WEST);
//outer.add(mainPanelScroll, DockPanel.CENTER);
outer.add(centerSplit, DockPanel.CENTER);
getMainPanel().setSize("100%", "100%");
getNavigationScreen().setSize("100%", "100%");
if (getFooterScreen() != null) {
getFooterScreen().setWidth("100%");
getFooterScreen().setStyleName("mdv-form");
outer.add(getFooterScreen(), DockPanel.SOUTH);
}
outer.setWidth("100%");
outer.setWidth("100%");
outer.setSpacing(4);
//outer.setCellWidth(getMainPanel(), "100%");
//outer.setCellHeight(getMainPanel(), "100%");
outer.setCellWidth(centerSplit, "100%");
outer.setCellHeight(centerSplit, "100%");
RootPanel.get().clear();
RootPanel.get().add(outer);
// No main scrolls..
Window.enableScrolling(false);
// Call the window resized handler to get the initial sizes setup.
onWindowResized(Window.getClientWidth(), Window.getClientHeight());
showScreen(WELCOME_SCREEN);
}
示例3: GuiFactory
import com.google.gwt.user.client.ui.DockPanel; //导入方法依赖的package包/类
/**
* Creates the GUI consisting of various panels
*/
public GuiFactory() {
// I18N strings
strings = (Strings) GWT.create(Strings.class);
notifications = (Notifications) GWT.create(Notifications.class);
// disallow scrolling
Window.enableScrolling(false);
// resize the panels on main window resize
Window.addWindowResizeListener(this);
// main application
dockPanel = new DockPanel();
dockPanel.setStyleName("restDescribe-mainApplicationPanel");
dockPanel.setWidth("99.7%");
dockPanel.setHeight("99.7%");
dockPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
dockPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
// main menu
MainMenuPanel mainMenuPanel = new MainMenuPanel();
dockPanel.add(mainMenuPanel, DockPanel.NORTH);
dockPanel.setCellHeight(mainMenuPanel, "10%");
// rest compile panel
RestCompilePanel restCompilePanel = new RestCompilePanel();
dockPanel.add(restCompilePanel, DockPanel.NORTH);
// request sample panel
RequestUriPanel requestUriPanel = new RequestUriPanel();
dockPanel.add(requestUriPanel, DockPanel.NORTH);
dockPanel.setCellHeight(requestUriPanel, "10%");
// navigation panel
ParameterPanel parameterPanel = new ParameterPanel();
dockPanel.add(parameterPanel, DockPanel.WEST);
dockPanel.setCellHeight(parameterPanel, "80%");
dockPanel.setCellWidth(parameterPanel, "45%");
dockPanel.setCellVerticalAlignment(parameterPanel, HasVerticalAlignment.ALIGN_TOP);
// wadl panel
WadlPanel wadlPanel = new WadlPanel();
dockPanel.add(wadlPanel, DockPanel.EAST);
dockPanel.setCellHeight(wadlPanel, "80%");
dockPanel.setCellWidth(wadlPanel, "55%");
dockPanel.setCellVerticalAlignment(wadlPanel, HasVerticalAlignment.ALIGN_TOP);
toggleMode(restDescribe);
RootPanel.get().add(dockPanel);
// semi-transparent screen blocker for dialogs
blockScreen = new DockPanel();
HTML semiTransparentDiv = getBlockedScreenDiv(Window.getClientWidth(), Window.getClientHeight());
blockScreen.add(semiTransparentDiv, DockPanel.SOUTH);
blockScreen.setVisible(false);
RootPanel.get().add(blockScreen);
onWindowResized(Window.getClientWidth(), Window.getClientHeight());
// reset the application
GuiFactory.resetApplication(GuiFactory.strings.newRequestUri());
}