本文整理汇总了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);
}
示例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);
}
示例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);
}
示例4: onModuleLoad
import com.google.gwt.user.client.ui.RootLayoutPanel; //导入方法依赖的package包/类
@Override
public void onModuleLoad() {
RootLayoutPanel rp = RootLayoutPanel.get();
rp.add(new DemoUI());
}