Search in sources :

Example 1 with SimpleLayoutPanel

use of com.google.gwt.user.client.ui.SimpleLayoutPanel in project che by eclipse.

the class BootstrapController method displayIDE.

private void displayIDE() {
    // Start UI
    SimpleLayoutPanel mainPanel = new SimpleLayoutPanel();
    RootLayoutPanel.get().add(mainPanel);
    // Make sure the root panel creates its own stacking context
    RootLayoutPanel.get().getElement().getStyle().setZIndex(0);
    WorkspacePresenter workspacePresenter = workspaceProvider.get();
    // Display IDE
    workspacePresenter.go(mainPanel);
    // Bind browser's window events
    Window.addWindowClosingHandler(new Window.ClosingHandler() {

        @Override
        public void onWindowClosing(Window.ClosingEvent event) {
            eventBus.fireEvent(WindowActionEvent.createWindowClosingEvent(event));
        }
    });
    Window.addCloseHandler(new CloseHandler<Window>() {

        @Override
        public void onClose(CloseEvent<Window> event) {
            eventBus.fireEvent(WindowActionEvent.createWindowClosedEvent());
        }
    });
}
Also used : Window(com.google.gwt.user.client.Window) WorkspacePresenter(org.eclipse.che.ide.workspace.WorkspacePresenter) SimpleLayoutPanel(com.google.gwt.user.client.ui.SimpleLayoutPanel)

Aggregations

Window (com.google.gwt.user.client.Window)1 SimpleLayoutPanel (com.google.gwt.user.client.ui.SimpleLayoutPanel)1 WorkspacePresenter (org.eclipse.che.ide.workspace.WorkspacePresenter)1