Java 类com.google.gwt.user.client.ui.RootLayoutPanel 实例源码

项目:sig-seguimiento-vehiculos    文件:App.java   
@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);
}
项目:document-management-system    文件:ExtendedDockPanel.java   
/**
 * 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);
}
项目:circuitjs1    文件:CirSim.java   
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();
  }
项目:circuitjs1    文件:CirSim.java   
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");
}
项目:geowe-core    文件:App.java   
@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);
}
项目:caja    文件:PlaygroundView.java   
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();
}
项目:test-analytics-ng    文件:TaEntryPoint.java   
/**
 * 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());
}
项目:gwt-ol3    文件:GwtOL3Playground.java   
@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));
    }
}
项目:geomajas-project-hammer-gwt    文件:HammerGwtExample.java   
@Override
public void onModuleLoad() {
    // Create a tab panel
    tabPanel = new TabLayoutPanel(2.5, Style.Unit.EM);
    tabPanel.setAnimationDuration(1000);
    tabPanel.getElement().getStyle().setMarginBottom(10.0, Style.Unit.PX);

    // Add event logger sample
    addTab(new EventLoggerSample());

    // Add a tab gwt panels
    addTab(new PanelsSample());

    tabPanel.selectTab(0);

    RootLayoutPanel.get().add(tabPanel);
}
项目:hexa.tools    文件:ResizablePanelBad.java   
public void hide()
{
    RootLayoutPanel.get().remove( this );

    if( glass != null )
    {
        RootLayoutPanel.get().remove( glass );
        glass = null;
    }
}
项目:mechaverse    文件:MechaverseClient.java   
@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();
}
项目:LanguageMemoryApp    文件:AppController.java   
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));
    }
}
项目:smonitor    文件:Admin.java   
@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();
}
项目:EasyML    文件:EMLStudio.java   
/**
 * 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());
}
项目:vaitools    文件:Vaitools.java   
public void onModuleLoad() 
{
    Viewport viewport = new Viewport();
    ToolBrowser s = new ToolBrowser();
    viewport.setWidget(s);
    RootLayoutPanel.get().add(viewport);
}
项目:ontobrowser    文件:OntoBrowser.java   
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);
}
项目:ephesoft    文件:ReportingEntryPoint.java   
@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);

}
项目:che    文件:DownloadContainer.java   
@Inject
public DownloadContainer() {
  frame = new Frame();
  frame.getElement().setAttribute("name", TARGET);
  frame.setSize("0px", "0px");
  frame.setVisible(false);
  frame.ensureDebugId(TARGET);

  RootLayoutPanel.get().add(frame);
}
项目:che    文件:DefaultIdeInitializationStrategy.java   
private void showRootPresenter() {
  SimpleLayoutPanel mainPanel = new SimpleLayoutPanel();
  RootLayoutPanel.get().add(mainPanel);
  RootLayoutPanel.get().getElement().getStyle().setZIndex(0);

  workspacePresenterProvider.get().go(mainPanel);
}
项目:che    文件:Window.java   
/**
 * Displays the {@link Window} popup. The popup will animate into view.
 *
 * @param selectAndFocusElement an {@link Focusable} to select and focus on when the panel is
 *     shown. If null, no element will be given focus
 */
public void show(@Nullable final Focusable selectAndFocusElement) {
  setBlocked(false);

  if (isShowing) {
    setFocusOn(
        selectAndFocusElement); // the window is displayed but focus for the element may be lost
    return;
  }

  isShowing = true;

  // Attach the popup to the body.
  final JsElement popup = view.popup.getElement().cast();
  if (popup.getParentElement() == null) {
    // Hide the popup so it can enter its initial state without flickering.

    popup.getStyle().setVisibility("hidden");
    RootLayoutPanel.get().add(view);
  }

  // The popup may have been hidden before this timer executes.
  if (isShowing) {
    popup.getStyle().removeProperty("visibility");
    // Start the animation after the element is attached.
    Scheduler.get()
        .scheduleDeferred(
            new ScheduledCommand() {
              @Override
              public void execute() {
                // The popup may have been hidden before this timer executes.
                view.setShowing(true);
                setFocusOn(selectAndFocusElement);
              }
            });
  }
}
项目:ErraiMessageBusChat    文件:ChatClient.java   
@PostConstruct
public void buildUI() {
  initWidget(uiBinder.createAndBindUi(this));
  panel = RootLayoutPanel.get();
  panel.add(this);
  initSubscribers();
}
项目:mvp4g-examples    文件:EmployeeAdminWithGXT.java   
@Override
public void onModuleLoad() {
  Mvp4gModule module = GWT.create(Mvp4gModule.class);
  module.createAndStartModule();
  RootLayoutPanel.get()
                 .add((Widget) module.getStartView());
}
项目:mvp4g-examples    文件:Mvp4gHyperlink.java   
/**
 * This is the entry point method.
 */
public void onModuleLoad() {
  GWT.<GlobalResources>create(GlobalResources.class)
     .css()
     .ensureInjected();

  Mvp4gModule module = (Mvp4gModule) GWT.create(Mvp4gModule.class);
  module.createAndStartModule();
  RootLayoutPanel.get()
                 .add((Widget) module.getStartView());
}
项目:mvp4g-examples    文件:MailEntryPoint.java   
/**
 * 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();

  Mvp4gModule module = (Mvp4gModule) GWT.create(Mvp4gModule.class);
  module.createAndStartModule();
  RootLayoutPanel.get()
                 .add((Widget) module.getStartView());
}
项目:mvp4g-examples    文件:EmployeeAdminWithGXT.java   
@Override
public void onModuleLoad() {
  Mvp4gModule module = GWT.create(Mvp4gModule.class);
  module.createAndStartModule();
  RootLayoutPanel.get()
                 .add((Widget) module.getStartView());
}
项目:mvp4g-examples    文件:EmployeeAdmin.java   
@Override
public void onModuleLoad() {
  Resources.CSS.employeeAdmin()
               .ensureInjected();

  Mvp4gModule module = GWT.create(Mvp4gModule.class);
  module.createAndStartModule();
  RootLayoutPanel.get()
                 .add((Widget) module.getStartView());
}
项目:TGAReader    文件:TexturedCube.java   
public void onModuleLoad() {

    Canvas canvas = Canvas.createIfSupported();
    canvas.setStyleName("MyCanvas");
    canvas.setCoordinateSpaceWidth(400);
    canvas.setCoordinateSpaceHeight(400);
    RootLayoutPanel.get().add(canvas);

    gl = (WebGLRenderingContext)canvas.getContext("experimental-webgl");
    gl.viewport(0, 0, 400, 400);

    WebGLBuffer vertexBuffer = gl.createBuffer();
    gl.bindBuffer(ARRAY_BUFFER, vertexBuffer);
    gl.bufferData(ARRAY_BUFFER, Float32Array.create(VERTICES), STATIC_DRAW);

    WebGLShader vertexShader = gl.createShader(VERTEX_SHADER);
    gl.shaderSource(vertexShader, VERTEX_SHADER_SOURCE);
    gl.compileShader(vertexShader);

    WebGLShader fragmentShader = gl.createShader(FRAGMENT_SHADER);
    gl.shaderSource(fragmentShader, FRAGMENT_SHADER_SOURCE);
    gl.compileShader(fragmentShader);

    program = gl.createProgram();
    gl.attachShader(program, vertexShader);
    gl.attachShader(program, fragmentShader);
    gl.linkProgram(program);

    gl.useProgram(program);
    gl.bindBuffer(ARRAY_BUFFER, vertexBuffer);

    WebGLUniformLocation texture = gl.getUniformLocation(program, "texture");
    gl.uniform1i(texture, 0);

    int posAttr = gl.getAttribLocation(program, "position");
    gl.vertexAttribPointer(posAttr, 3, FLOAT, false, 5*4, 0);
    gl.enableVertexAttribArray(posAttr);

    int texAttr = gl.getAttribLocation(program, "texcoord");
    gl.vertexAttribPointer(texAttr, 2, FLOAT, false, 5*4, 3*4);
    gl.enableVertexAttribArray(texAttr);

    for(int i=0; i<TEXTURE_URLS.length; i++) {
        loadTexture(TEXTURE_URLS[i], i);
    }

}
项目:GraphemeColourSynaesthesiaApp    文件:ColourPickerPresenter.java   
public ColourPickerPresenter(RootLayoutPanel widgetTag, UserResults userResults, int repeatCount) throws CanvasError {
    this.widgetTag = widgetTag;
    this.stimuliGroup = userResults.getPendingStimuliGroup();
    userResults.setPendingStimuliGroup(null);
    this.stimuli = new ArrayList<>(stimuliGroup.getStimuli());
    this.userResults = userResults;
    this.repeatCount = repeatCount;
    maxStimuli = this.stimuli.size();
    colourPickerCanvasView = new ColourPickerCanvasView();
}
项目:GraphemeColourSynaesthesiaApp    文件:GraphemeColour.java   
/**
 * This is the entry point method.
 */
@Override
public void onModuleLoad() {
    final RootLayoutPanel widgetTag = RootLayoutPanel.get();
    widgetTag.getElement().setId("widgetTag");
    final AppController appController = new AppController(widgetTag);
    appController.start();
}
项目:zico    文件:ZicoEP.java   
public void onModuleLoad() {
    Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
        @Override
        public void execute() {
            Window.enableScrolling(false);
            shell = injector.getShell();
            RootLayoutPanel.get().add(shell);
        }
    });
}
项目:hexa.tools    文件:Application.java   
@Override
public void onModuleLoad()
{
    WorkPanelController ctrl = new WorkPanelController();

    RootLayoutPanel.get().add(ctrl);

    IWorkPanel workPanel = DaggerApplication_WPShop.builder().wPModule(new WPModule()).build().panel();

    ctrl.startWorkPanel(workPanel, new XWPExec()
    {
        @Override
        public void onResult(Object result)
        {
            Window.alert("Result ! : " + result);
        }

        @Override
        public void onError(Throwable throwable)
        {
            Window.alert("Error ! : " + throwable);
        }

        @Override
        public void onCancel()
        {
            Window.alert("Cancelled...");
        }
    }, WPDisplayMode.DIALOG);
}
项目:hexa.tools    文件:HexaDemo.java   
@Override
    public void onModuleLoad()
    {
        CenterPanel centerPanel = new CenterPanel();
        RootLayoutPanel.get().add( centerPanel );
//      centerPanel.setWidget( new Form() );

        DataBindingDemo dataBindingDemo = new DataBindingDemo();
        dataBindingDemo.run( centerPanel );
    }
项目:hexa.tools    文件:ResizablePanelBad.java   
@Override
public void onResize()
{
    int left = ResizablePanelBad.this.getAbsoluteLeft();
    int top = ResizablePanelBad.this.getAbsoluteTop();
    int width = ResizablePanelBad.this.getOffsetWidth();
    int height = ResizablePanelBad.this.getOffsetHeight();

    PositionAndSize posSize = new PositionAndSize( left, top, width, height );

    boolean needAdjustment = posSize.limit();
    if( needAdjustment )
    {
        GWT.log( "onResize => re-resize !" );

        RootLayoutPanel.get().setWidgetLeftWidth( ResizablePanelBad.this, posSize.left, Unit.PX, posSize.width, Unit.PX );
        RootLayoutPanel.get().setWidgetTopHeight( ResizablePanelBad.this, posSize.top, Unit.PX, posSize.height, Unit.PX );

        return;
    }

    for( Widget child : getChildren() )
    {
        if( child instanceof RequiresResize )
        {
            ((RequiresResize) child).onResize();
        }
    }
}
项目:hexa.tools    文件:DialogBoxForLayoutWidget.java   
@Override
public void show( boolean isAutoHide )
{
    this.isAutoHide = isAutoHide;

    if( isDisplayed )
        return;
    isDisplayed = true;

    RootLayoutPanel.get().add( dock );
}
项目:hexa.tools    文件:DialogBoxForLayoutWidget.java   
@Override
public void hide()
{
    if( ! isDisplayed )
        return;
    isDisplayed = false;

    RootLayoutPanel.get().remove( dock );

    CloseEvent.fire( this, null );
}
项目:gwtoauthlogindemo    文件:GWTOAuthLoginDemo.java   
private void showApp()
{
    Window.setMargin("0px");
    RootLayoutPanel rootLayoutPanel = RootLayoutPanel.get();
    rootLayoutPanel.clear();
    appScreen.setWidth("100%");
    rootLayoutPanel.add(appScreen);
}
项目:LanguageMemoryApp    文件:GuessRoundPresenter.java   
public GuessRoundPresenter(RootLayoutPanel widgetTag, UserResults userResults, final AudioPlayer audioPlayer) throws AudioException {
    super(widgetTag, userResults, audioPlayer, new GuessRoundView(audioPlayer));
    guessRoundView = (GuessRoundView) abstractSvgView;
    languageDataProvider = new LanguageDataProvider();
    int playerGamesPlayed = userResults.getUserData().getGamesPlayed();
    userResults.getGameData().clearGameCounters();
    playerLevel = new GameState().getPlayerLevel(playerGamesPlayed);
    roundDataProvider = new RoundDataProvider();
}
项目:LanguageMemoryApp    文件:LanguageMemory.java   
/**
 * This is the entry point method.
 */
@Override
public void onModuleLoad() {
    final RootLayoutPanel widgetTag = RootLayoutPanel.get();
    widgetTag.getElement().setId("widgetTag");
    final AppController appController = new AppController(widgetTag);
    appController.start();
}
项目:fns-projects    文件:App.java   
@Override
public void onModuleLoad() {
    initRestyGwt();
    mvp4gModule.createAndStartModule();
    RootLayoutPanel.get().add((IsWidget) mvp4gModule.getStartView());

    // See
    // http://www.summa-tech.com/blog/2012/06/11/7-tips-for-exception-handling-in-gwt/
    handleUncaughtClientSideExceptions(mvp4gModule.getEventBus());
}
项目:Peergos    文件:Mail.java   
/**
 * 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);
}