本文整理汇总了Java中com.google.gwt.user.client.ui.RootLayoutPanel类的典型用法代码示例。如果您正苦于以下问题:Java RootLayoutPanel类的具体用法?Java RootLayoutPanel怎么用?Java RootLayoutPanel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RootLayoutPanel类属于com.google.gwt.user.client.ui包,在下文中一共展示了RootLayoutPanel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildUI
import com.google.gwt.user.client.ui.RootLayoutPanel; //导入依赖的package包/类
@PostConstruct
public void buildUI() {
OpenLayers.setProxyHost("gwtOpenLayersProxy?targetURL=");
RootLayoutPanel.get().add(geoMap.getMapWidget());
RootPanel.get().add(actionBar);
RootPanel.get().add(linksWidget);
RootPanel.get().add(zoomStatusWidget);
logger.info("Map initialize...");
geoMapInitializer.initialize();
rasterLayerInitializer.initialize();
vectorLayerInitializer.initialize();
widgetInitializer.initialize();
eventListenerInitializer.initialize();
showDisclaimer();
RestClient.setJacksonMarshallingActive(true);
RootPanel.get("splash").setVisible(false);
}
示例2: setWidgetsSize
import com.google.gwt.user.client.ui.RootLayoutPanel; //导入依赖的package包/类
/**
* SetWidgetsSize
*/
private void setWidgetsSize() {
// Calculating real height
usableHeight = Window.getClientHeight();
if (Main.get().hasHeaderCustomization) {
usableHeight -= 72;
RootLayoutPanel.get().setWidgetTopBottom(Main.get().mainPanel, 72, Style.Unit.PX, 0, Style.Unit.PX);
}
// Initialize dockPanel size
dockPanel.setSize("" + Window.getClientWidth() + "px", "" + usableHeight + "px");
// The active panel must be the last on initalization because establishes coordenates
leftBorderPanel.setSize(VERTICAL_BORDER_PANEL_WIDTH, usableHeight - (TopPanel.PANEL_HEIGHT + BottomPanel.PANEL_HEIGHT));
rightBorderPanel.setSize(VERTICAL_BORDER_PANEL_WIDTH, usableHeight - (TopPanel.PANEL_HEIGHT + BottomPanel.PANEL_HEIGHT));
centerWidth = Window.getClientWidth() - (2 * VERTICAL_BORDER_PANEL_WIDTH);
centerHeight = usableHeight - (TopPanel.PANEL_HEIGHT + BottomPanel.PANEL_HEIGHT);
topPanel.setWidth("" + Window.getClientWidth() + "px");
desktop.setSize(centerWidth, centerHeight);
search.setSize(centerWidth, centerHeight);
dashboard.setSize(centerWidth, centerHeight);
administration.setSize(centerWidth, centerHeight);
}
示例3: setCanvasSize
import com.google.gwt.user.client.ui.RootLayoutPanel; //导入依赖的package包/类
public void setCanvasSize(){
int width, height;
width=(int)RootLayoutPanel.get().getOffsetWidth();
height=(int)RootLayoutPanel.get().getOffsetHeight();
height=height-MENUBARHEIGHT;
width=width-VERTICALPANELWIDTH;
if (cv != null) {
cv.setWidth(width + "PX");
cv.setHeight(height + "PX");
cv.setCoordinateSpaceWidth(width);
cv.setCoordinateSpaceHeight(height);
}
if (backcv != null) {
backcv.setWidth(width + "PX");
backcv.setHeight(height + "PX");
backcv.setCoordinateSpaceWidth(width);
backcv.setCoordinateSpaceHeight(height);
}
setCircuitArea();
}
示例4: setiFrameHeight
import com.google.gwt.user.client.ui.RootLayoutPanel; //导入依赖的package包/类
public void setiFrameHeight() {
if (iFrame==null)
return;
int i;
int cumheight=0;
for (i=0; i < verticalPanel.getWidgetIndex(iFrame); i++) {
if (verticalPanel.getWidget(i) !=loadFileInput) {
cumheight=cumheight+verticalPanel.getWidget(i).getOffsetHeight();
if (verticalPanel.getWidget(i).getStyleName().contains("topSpace"))
cumheight+=12;
}
}
int ih=RootLayoutPanel.get().getOffsetHeight()-MENUBARHEIGHT-cumheight;
if (ih<0)
ih=0;
iFrame.setHeight(ih+"px");
}
示例5: PlaygroundView
import com.google.gwt.user.client.ui.RootLayoutPanel; //导入依赖的package包/类
public PlaygroundView(Playground controller) {
this.controller = controller;
this.sourceExamples = new MultiWordSuggestOracle();
this.policyExamples = new MultiWordSuggestOracle();
this.playgroundUI =
new com.google.caja.demos.playground.client.ui.PlaygroundUI(
sourceExamples, policyExamples);
RootLayoutPanel.get().add(playgroundUI);
initSourcePanel();
initPolicyPanel();
initFeedbackPanel();
initExamples();
initEditor();
initCaja(true);
initPlusOne();
initUnsafe();
}
示例6: onModuleLoad
import com.google.gwt.user.client.ui.RootLayoutPanel; //导入依赖的package包/类
/**
* Entry point for the application.
*/
@Override
public void onModuleLoad() {
projectService = GWT.create(ProjectRpc.class);
userService = GWT.create(UserRpc.class);
dataService = GWT.create(DataRpc.class);
contentPanel = new LayoutPanel();
RootLayoutPanel.get().add(contentPanel);
// Handle history changes. (Such as clicking a navigation hyperlink.)
History.addValueChangeHandler(new ValueChangeHandler<String>() {
@Override
public void onValueChange(ValueChangeEvent<String> event) {
String historyToken = event.getValue();
handleUrl(historyToken);
}
});
handleUrl(History.getToken());
}
示例7: onModuleLoad
import com.google.gwt.user.client.ui.RootLayoutPanel; //导入依赖的package包/类
@Override
public void onModuleLoad() {
Map<String, Integer> exampleIndexMap = new HashMap<>();
// choose your example
TabLayoutPanel tabs = new TabLayoutPanel(27, Style.Unit.PX);
int index = 0;
for (OL3ExampleType example : OL3ExampleType.values()) {
tabs.add(new LazyExampleWidget(example), example.name().replace("Example", ""));
exampleIndexMap.put(example.name(), index);
index++;
}
RootLayoutPanel.get().add(tabs);
String token = History.getToken();
if (token != null && exampleIndexMap.containsKey(token)) {
tabs.selectTab(exampleIndexMap.get(token));
}
}
示例8: hide
import com.google.gwt.user.client.ui.RootLayoutPanel; //导入依赖的package包/类
public void hide()
{
RootLayoutPanel.get().remove( this );
if( glass != null )
{
RootLayoutPanel.get().remove( glass );
glass = null;
}
}
示例9: onModuleLoad
import com.google.gwt.user.client.ui.RootLayoutPanel; //导入依赖的package包/类
@Override
public void onModuleLoad() {
ensureCssInjected();
ManagerClientFactory clientFactory = new DefaultManagerClientFactoryImpl();
EventBus eventBus = clientFactory.getEventBus();
PlaceController placeController = clientFactory.getPlaceController();
// Start ActivityManager for the main widget with our ActivityMapper
ActivityMapper activityMapper = new ManagerActivityMapper(clientFactory);
ActivityManager activityManager = new ActivityManager(activityMapper, eventBus);
activityManager.setDisplay(clientFactory.getLayoutView());
// Start PlaceHistoryHandler with our PlaceHistoryMapper
ManagerPlaceHistoryMapper historyMapper= GWT.create(ManagerPlaceHistoryMapper.class);
PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(historyMapper);
historyHandler.register(placeController, eventBus, defaultPlace);
RootLayoutPanel.get().add(clientFactory.getLayoutView());
historyHandler.handleCurrentHistory();
}
示例10: AppController
import com.google.gwt.user.client.ui.RootLayoutPanel; //导入依赖的package包/类
public AppController(RootLayoutPanel widgetTag) {
this.widgetTag = widgetTag;
final UserId lastUserId = localStorage.getLastUserId();
if (lastUserId == null) {
userResults = new UserResults(new UserData());
} else {
userResults = new UserResults(localStorage.getStoredData(lastUserId));
}
}
示例11: onModuleLoad
import com.google.gwt.user.client.ui.RootLayoutPanel; //导入依赖的package包/类
@Override
public void onModuleLoad() {
// Rest client configuration
RestClient.setJacksonMarshallingActive(true);
RestClient.setApplicationRoot("rs");
// Disable right click
RootLayoutPanel.get().addDomHandler(new ContextMenuHandler() {
@Override
public void onContextMenu(ContextMenuEvent event) {
event.preventDefault();
event.stopPropagation();
}
}, ContextMenuEvent.getType());
// Create main content
mainLayout = new MainLayout();
RootLayoutPanel.get().add(mainLayout);
// init
mainLayout.init();
}
示例12: onModuleLoad
import com.google.gwt.user.client.ui.RootLayoutPanel; //导入依赖的package包/类
/**
* EMLStudio module load method
*/
@Override
public void onModuleLoad() {
HandlerManager eventBus = new HandlerManager(null);
LoginController loginController = new LoginController(eventBus);
AppController appViewer = new AppController(eventBus, loginController);
appViewer.go(RootLayoutPanel.get());
}
示例13: onModuleLoad
import com.google.gwt.user.client.ui.RootLayoutPanel; //导入依赖的package包/类
public void onModuleLoad()
{
Viewport viewport = new Viewport();
ToolBrowser s = new ToolBrowser();
viewport.setWidget(s);
RootLayoutPanel.get().add(viewport);
}
示例14: layoutViews
import com.google.gwt.user.client.ui.RootLayoutPanel; //导入依赖的package包/类
private void layoutViews() {
TermDetailsView termView = new TermDetailsView(eventBus, service);
TermSynonymsView synonymsView = new TermSynonymsView(eventBus, service);
RelatedTermsView relationshipsView = new RelatedTermsView(eventBus, service);
SearchInputView searchInputView = new SearchInputView(eventBus, service);
SearchOptionsView searchOptionsView = new SearchOptionsView(eventBus, service);
SearchResultsView searchResultsView = new SearchResultsView(eventBus, service, searchOptionsView);
SVGView svgView = new SVGView(eventBus, service);
//CodeListView codelistView = new CodeListView(eventBus, service);
DockLayoutPanel layoutPanel = new DockLayoutPanel(Unit.PX);
HorizontalPanel southPanel = new HorizontalPanel();
southPanel.add(termView);
southPanel.add(synonymsView);
southPanel.add(relationshipsView);
southPanel.setCellWidth(termView, "33.33%");
southPanel.setCellWidth(synonymsView, "33.33%");
southPanel.setCellWidth(relationshipsView, "33.33%");
southPanel.setWidth("100%");
FlowPanel eastPanel = new FlowPanel();
eastPanel.add(searchInputView);
eastPanel.add(searchOptionsView);
eastPanel.add(searchResultsView);
layoutPanel.addNorth(menuBar, 30);
layoutPanel.addSouth(southPanel, 197);
layoutPanel.addEast(eastPanel, 300);
layoutPanel.add(svgView);
RootLayoutPanel.get().add(layoutPanel);
}
示例15: 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);
}