當前位置: 首頁>>代碼示例>>Java>>正文


Java RootLayoutPanel.add方法代碼示例

本文整理匯總了Java中com.google.gwt.user.client.ui.RootLayoutPanel.add方法的典型用法代碼示例。如果您正苦於以下問題:Java RootLayoutPanel.add方法的具體用法?Java RootLayoutPanel.add怎麽用?Java RootLayoutPanel.add使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.gwt.user.client.ui.RootLayoutPanel的用法示例。


在下文中一共展示了RootLayoutPanel.add方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onLoad

import com.google.gwt.user.client.ui.RootLayoutPanel; //導入方法依賴的package包/類
@Override
public void onLoad() {

	LayoutPanel layoutPanel = new LayoutPanel();
	controller = new ReportingController(eventBus, rpcService);
	layoutPanel.add(controller.createView());
	ReportingPresenter reportingPresenter = controller.getPresenter();
	reportingPresenter.bind();

	final RootPanel rootPanel = new RootPanel(layoutPanel, rpcService);

	rootPanel.getHeader().addTab("Batch Class Management", "BatchClassManagement.html", false);
	rootPanel.getHeader().addTab("Batch Instance Management", "BatchInstanceManagement.html", false);
	rootPanel.getHeader().addTab("Workflow Management", "CustomWorkflowManagement.html", false);
	rootPanel.getHeader().addTab("Folder Management", "FolderManager.html", false);
	rootPanel.getHeader().addNonClickableTab("Reports", "Reporting.html");
	rootPanel.getHeader().getTabBar().selectTab(4);
	rootPanel.addStyleName("set_position");
	rootPanel.getHeader().setEventBus(eventBus);

	rpcService.getUserName(new EphesoftAsyncCallback<String>() {

		@Override
		public void onSuccess(final String userName) {
			rootPanel.getHeader().setUserName(userName);
		}

		@Override
		public void customFailure(final Throwable arg0) {
			// Username cannot be set if the call failed.
		}
	});

	RootLayoutPanel rootLayoutPanel = RootLayoutPanel.get();
	rootLayoutPanel.clear();
	rootLayoutPanel.add(rootPanel);

}
 
開發者ID:kuzavas,項目名稱:ephesoft,代碼行數:39,代碼來源:ReportingEntryPoint.java

示例2: showApp

import com.google.gwt.user.client.ui.RootLayoutPanel; //導入方法依賴的package包/類
private void showApp()
{
    Window.setMargin("0px");
    RootLayoutPanel rootLayoutPanel = RootLayoutPanel.get();
    rootLayoutPanel.clear();
    appScreen.setWidth("100%");
    rootLayoutPanel.add(appScreen);
}
 
開發者ID:muquit,項目名稱:gwtoauthlogindemo,代碼行數:9,代碼來源:GWTOAuthLoginDemo.java

示例3: onModuleLoad

import com.google.gwt.user.client.ui.RootLayoutPanel; //導入方法依賴的package包/類
/**
 * This method constructs the application user interface by instantiating
 * controls and hooking up event handler.
 */
public void onModuleLoad() {
  // Inject global styles.
  GWT.<GlobalResources>create(GlobalResources.class).css().ensureInjected();

  // Create the UI defined in Mail.ui.xml.
  DockLayoutPanel outer = binder.createAndBindUi(this);

  // Get rid of scrollbars, and clear out the window's built-in margin,
  // because we want to take advantage of the entire client area.
  Window.enableScrolling(false);
  Window.setMargin("0px");

  // Special-case stuff to make topPanel overhang a bit.
  Element topElem = outer.getWidgetContainerElement(topPanel);
  topElem.getStyle().setZIndex(2);
  topElem.getStyle().setOverflow(Overflow.VISIBLE);

  // Listen for item selection, displaying the currently-selected item in
  // the detail area.
  mailList.setListener(new MailList.Listener() {
    public void onItemSelected(MailItem item) {
      mailDetail.setItem(item);
    }
  });

  // Add the outer panel to the RootLayoutPanel, so that it will be
  // displayed.
  RootLayoutPanel root = RootLayoutPanel.get();
  root.add(outer);
}
 
開發者ID:Peergos,項目名稱:Peergos,代碼行數:35,代碼來源:Mail.java

示例4: onModuleLoad

import com.google.gwt.user.client.ui.RootLayoutPanel; //導入方法依賴的package包/類
@Override
public void onModuleLoad() {
   RootLayoutPanel rp = RootLayoutPanel.get();
   rp.add(new DemoUI());
}
 
開發者ID:ainslec,項目名稱:gwt-promptly,代碼行數:6,代碼來源:PromptlyDemo.java


注:本文中的com.google.gwt.user.client.ui.RootLayoutPanel.add方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。