List of usage examples for com.google.gwt.user.client Window enableScrolling
public static void enableScrolling(boolean enable)
From source file:com.google.gerrit.client.editor.EditScreen.java
License:Apache License
@Override protected void onUnload() { super.onUnload(); if (cmBase != null) { cmBase.getWrapperElement().removeFromParent(); }/*w ww .ja v a 2 s . c o m*/ if (cmEdit != null) { cmEdit.getWrapperElement().removeFromParent(); } if (resizeHandler != null) { resizeHandler.removeHandler(); } if (closeHandler != null) { closeHandler.removeHandler(); } Window.enableScrolling(true); Gerrit.setHeaderVisible(true); JumpKeys.enable(true); }
From source file:com.google.gwt.demos.glasspanel.client.GlassPanelDemo.java
License:Apache License
public void onModuleLoad2() { RootPanel.get().add(new HTML("<code>$doc.compatMode = <b>" + getCompatMode() + "</b></code>")); redAbsolutePanel = new AbsolutePanel(); redAbsolutePanel.setPixelSize(130, 130); RootPanel.get().add(redAbsolutePanel, 500, 150); redAbsolutePanel.add(new HTML( "This red GlassPanel was created<br>" + "with <code>autoHide</code> set to <code>false</code>.")); greenAbsolutePanel = RootPanel.get("xyz"); workaroundIssue1813(greenAbsolutePanel.getElement()); greenAbsolutePanel.add(new HTML("Click or press <code>ESC</code> once<br>" + "to remove the gray GlassPanel.<br><br>" + "Click or press <code>ESC</code> a second<br>" + "time to remove this green GlassPanel.")); Button buttonBodyDefault = new Button("BODY setSize(\"\", \"\")"); buttonBodyDefault.addClickListener(new ClickListener() { public void onClick(Widget sender) { removeGlassPanel();//www .ja v a2 s. c om RootPanel.get().setSize("", ""); resetGlassPanels(); } }); Button buttonBodyLarge = new Button("BODY setSize(\"1000px\", \"1000px\")"); buttonBodyLarge.addClickListener(new ClickListener() { public void onClick(Widget sender) { removeGlassPanel(); RootPanel.get().setSize("1000px", "1000px"); resetGlassPanels(); } }); Button buttonHTMLDefault = new Button("HTML setSize(\"\", \"\")"); buttonHTMLDefault.addClickListener(new ClickListener() { public void onClick(Widget sender) { removeGlassPanel(); Element htmlElement = DOM.getParent(RootPanel.getBodyElement()); DOM.setStyleAttribute(htmlElement, "width", ""); DOM.setStyleAttribute(htmlElement, "height", ""); resetGlassPanels(); } }); Button buttonHTMLLarge = new Button("HTML setSize(\"2000px\", \"2000px\")"); buttonHTMLLarge.addClickListener(new ClickListener() { public void onClick(Widget sender) { removeGlassPanel(); Element htmlElement = DOM.getParent(RootPanel.getBodyElement()); DOM.setStyleAttribute(htmlElement, "width", "2000px"); DOM.setStyleAttribute(htmlElement, "height", "2000px"); resetGlassPanels(); } }); Button buttonScrollingEnable = new Button("Window.enableScrolling(true)"); buttonScrollingEnable.addClickListener(new ClickListener() { public void onClick(Widget sender) { removeGlassPanel(); Window.enableScrolling(true); resetGlassPanels(); } }); Button buttonScrollingDisable = new Button("Window.enableScrolling(false)"); buttonScrollingDisable.addClickListener(new ClickListener() { public void onClick(Widget sender) { removeGlassPanel(); Window.enableScrolling(false); resetGlassPanels(); } }); FlexTable buttonTable = new FlexTable(); buttonTable.addStyleName("buttons"); RootPanel.get().add(buttonTable, 100, 50); buttonTable.setWidget(0, 0, buttonBodyDefault); buttonTable.setWidget(0, 1, buttonBodyLarge); buttonTable.setWidget(1, 0, buttonHTMLDefault); buttonTable.setWidget(1, 1, buttonHTMLLarge); buttonTable.setWidget(2, 0, buttonScrollingEnable); buttonTable.setWidget(2, 1, buttonScrollingDisable); resetGlassPanels(); }
From source file:com.google.gwt.sample.mail.client.Mail.java
License:Apache License
/** * This method constructs the application user interface by instantiating * controls and hooking up event handler. *//* w ww . j a v a 2s. c o m*/ 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); }
From source file:com.gwtcx.smartgwt.client.view.AbstractMainPageView.java
License:Open Source License
@Inject public AbstractMainPageView(Masthead masthead, ApplicationMenu applicationMenu, NavigationPaneHeader navigationPaneHeader, NavigationPane navigationPane) { super();/*w w w. j a v a2 s. c o m*/ this.masthead = masthead; this.applicationMenu = applicationMenu; this.navigationPaneHeader = navigationPaneHeader; this.navigationPane = navigationPane; // get rid of scroll bars, 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(DEFAULT_MARGIN); // initialise the main layout container viewport = new VLayout(); viewport.setWidth100(); viewport.setHeight100(); // initialise the North layout container northLayout = new HLayout(); northLayout.setHeight(NORTH_HEIGHT); // initialise the nested layout container VLayout vLayout = new VLayout(); vLayout.addMember(this.masthead); vLayout.addMember(this.applicationMenu); vLayout.addMember(this.navigationPaneHeader); // add the nested layout container to the North layout container northLayout.addMember(vLayout); // initialise the West layout container westLayout = this.navigationPane; // initialise the South layout container southLayout = new HLayout(); // add the North and South layout containers to the main layout container viewport.addMember(northLayout); viewport.addMember(southLayout); bindCustomUiHandlers(); }
From source file:com.gwtcx.smartgwt.client.view.AccountPageView.java
License:Open Source License
@Inject public AccountPageView(EntityToolBar toolBar, EntityMasthead masthead, NavigationPane navigationPane) { super();//from w ww.j av a 2 s .c o m this.toolBar = toolBar; this.masthead = masthead; this.navigationPane = navigationPane; // get rid of scroll bars, 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(DEFAULT_MARGIN); // initialise the main layout container panel = new VLayout(); panel.setWidth100(); panel.setHeight100(); panel.setStyleName(ENTITY_MAIN_LAYOUT_STYLE_NAME); // initialise the North layout container northLayout = new HLayout(); northLayout.setHeight(NORTH_HEIGHT); // initialise the nested layout container VLayout vLayout = new VLayout(); vLayout.addMember(this.toolBar); vLayout.addMember(this.masthead); // add the nested layout container to the North layout container northLayout.addMember(vLayout); initNavigationPane(); // initialise the West layout container westLayout = this.navigationPane; // initialise the South layout container southLayout = new HLayout(); // add the North and South layout containers to the main layout container panel.addMember(northLayout); panel.addMember(southLayout); // bindCustomUiHandlers(); }
From source file:com.gwtcx.smartgwt.client.view.EmailPageView.java
License:Open Source License
@Inject public EmailPageView(EntityToolBar toolBar, EntityMasthead masthead) { this.toolBar = toolBar; this.masthead = masthead; // get rid of scroll bars, 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(DEFAULT_MARGIN); // initialise the main layout container panel = new VLayout(); panel.setWidth100();// w ww.j a va2 s .co m panel.setHeight100(); panel.setStyleName(ENTITY_MAIN_LAYOUT_STYLE_NAME); // initialise the North layout container northLayout = new HLayout(); northLayout.setHeight(NORTH_HEIGHT); // initialise the nested layout container VLayout vLayout = new VLayout(); vLayout.addMember(this.toolBar); vLayout.addMember(this.masthead); // add the nested layout container to the North layout container northLayout.addMember(vLayout); // initialise the South layout container southLayout = new HLayout(); // add the North and South layout containers to the main layout container panel.addMember(northLayout); panel.addMember(southLayout); // bindCustomUiHandlers(); }
From source file:com.gwtcx.smartgwt.client.view.FileUploadPageView.java
License:Open Source License
@Inject public FileUploadPageView() { // get rid of scroll bars, 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(DEFAULT_MARGIN); // initialise the main layout container panel = new VLayout(); panel.setWidth100();//from w ww . j a v a 2s.c o m panel.setHeight100(); // initialise the North layout container northLayout = new VLayout(); northLayout.setWidth100(); northLayout.setHeight(HEADER_HEIGHT); // initialise the South layout container southLayout = new VLayout(); southLayout.setWidth100(); southLayout.setHeight100(); // add the nested layout containers to the main layout containers northLayout.addMember(initHeader()); southLayout.addMember(initBody()); southLayout.addMember(initFooter()); // add the North and South layout containers to the main layout container panel.addMember(northLayout); panel.addMember(southLayout); // bindCustomUiHandlers(); // set the browser window's title Window.setTitle(I18nUtil.getConstant().fileUploadWindowTitle()); }
From source file:com.ikon.frontend.client.Main.java
License:Open Source License
/** * onModuleLoad2//from w w w .j a va 2s . c om */ public void onModuleLoad2() { // Initialize workspace properties workspaceUserProperties = new WorkspaceUserProperties(); // Initialize user home userHome = new GWTUserConfig(); // Initialize panels mainPanel = new ExtendedDockPanel(); // Loading popup startUpPopup = new StartUpPopup(); startUpPopup.setWidth("100px"); startUpPopup.setHeight("50px"); startUpPopup.setStyleName("okm-Popup"); startUpPopup.addStyleName("okm-DisableSelect"); // Initialize general panels fileUpload = new FileUploadPopup(); fileUpload.setStyleName("okm-Popup"); errorPopup = new ErrorPopup(false); errorPopup.setStyleName("okm-Popup-Error"); errorPopup.setWidth("100px"); errorPopup.setHeight("50px"); errorPopupServer = new ErrorPopup(); errorPopupServer.setStyleName("okm-Popup-Error"); errorPopupServer.setWidth("100px"); errorPopupServer.setHeight("50px"); errorPopupLogout = new ErrorPopup(true); errorPopupLogout.setStyleName("okm-Popup-Error"); errorPopupLogout.setWidth("100px"); errorPopupLogout.setHeight("50px"); msgPopup = new MsgPopup(); msgPopup.setStyleName("okm-Popup"); msgPopup.setWidth("300px"); msgPopup.setHeight("205px"); externalURLPopup = new ExternalURLPopup(); externalURLPopup.setStyleName("okm-Popup"); logoutPopup = new LogoutPopup(); logoutPopup.setWidth("250"); logoutPopup.setHeight("110"); logoutPopup.setStyleName("okm-Popup"); logoutPopup.addStyleName("okm-DisableSelect"); securityPopup = new SecurityPopup(); securityPopup.setWidth("600"); securityPopup.setHeight("400"); securityPopup.setStyleName("okm-Popup"); securityPopup.addStyleName("okm-DisableSelect"); aboutPopup = new AboutPopup(); aboutPopup.setWidth("300px"); aboutPopup.setHeight("220px"); aboutPopup.setStyleName("okm-Popup"); aboutPopup.addStyleName("okm-DisableSelect"); userPopup = new UserPopup(); userPopup.setWidth("470px"); userPopup.setHeight("220px"); userPopup.setStyleName("okm-Popup"); // userPopup.addStyleName("okm-DisableSelect"); confirmPopup = new ConfirmPopup(); confirmPopup.setWidth("300px"); confirmPopup.setHeight("125px"); confirmPopup.setStyleName("okm-Popup"); confirmPopup.addStyleName("okm-DisableSelect"); dragable = new Dragable(); propertyGroupPopup = new PropertyGroupPopup(); propertyGroupPopup.setWidth("300px"); propertyGroupPopup.setHeight("50px"); propertyGroupPopup.setStyleName("okm-Popup"); propertyGroupPopup.addStyleName("okm-DisableSelect"); workflowPopup = new WorkflowPopup(); workflowPopup.setWidth("300px"); workflowPopup.setHeight("100px"); workflowPopup.setStyleName("okm-Popup"); workflowPopup.addStyleName("okm-DisableSelect"); notifyPopup = new NotifyPopup(); notifyPopup.setWidth("400px"); notifyPopup.setHeight("100px"); notifyPopup.setStyleName("okm-Popup"); debugConsolePopup = new DebugConsolePopup(); debugConsolePopup.setWidth("300px"); debugConsolePopup.setHeight("100px"); debugConsolePopup.setStyleName("okm-Popup"); debugConsolePopup.addStyleName("okm-DisableSelect"); findFolderSelectPopup = new FindFolderSelectPopup(); findFolderSelectPopup.setWidth("700px"); findFolderSelectPopup.setHeight("390px"); findFolderSelectPopup.setStyleName("okm-Popup"); findFolderSelectPopup.addStyleName("okm-DisableSelect"); findDocumentSelectPopup = new FindDocumentSelectPopup(); findDocumentSelectPopup.setWidth("700px"); findDocumentSelectPopup.setHeight("390px"); findDocumentSelectPopup.setStyleName("okm-Popup"); findDocumentSelectPopup.addStyleName("okm-DisableSelect"); wizardPopup = new WizardPopup(); wizardPopup.setWidth("400px"); wizardPopup.setHeight("40px"); wizardPopup.setStyleName("okm-Popup"); wizardPopup.addStyleName("okm-DisableSelect"); reportPopup = new ReportPopup(); reportPopup.setWidth("250px"); reportPopup.setHeight("40px"); reportPopup.setStyleName("okm-Popup"); reportPopup.addStyleName("okm-DisableSelect"); templateWizardPopup = new TemplateWizardPopup(); templateWizardPopup.setWidth("400px"); templateWizardPopup.setHeight("40px"); templateWizardPopup.setStyleName("okm-Popup"); templateWizardPopup.addStyleName("okm-DisableSelect"); onlineUsersPopup = new OnlineUsersPopup(); onlineUsersPopup.setWidth("250px"); onlineUsersPopup.setHeight("350px"); onlineUsersPopup.setStyleName("okm-Popup"); onlineUsersPopup.addStyleName("okm-DisableSelect"); testPopup = new TestPopup(); testPopup.setWidth("600px"); testPopup.setHeight("500px"); testPopup.setStyleName("okm-Popup"); notesPopup = new NotesPopup(); notesPopup.setWidth("470px"); notesPopup.setHeight("220px"); notesPopup.setStyleName("okm-Popup"); categoriesPopup = new CategoriesPopup(); categoriesPopup.setWidth("470px"); categoriesPopup.setHeight("220px"); categoriesPopup.setStyleName("okm-Popup"); keywordsPopup = new KeywordsPopup(); keywordsPopup.setWidth("470px"); keywordsPopup.setHeight("100px"); keywordsPopup.setStyleName("okm-Popup"); templatePopup = new TemplatePopup(); templatePopup.setWidth("350px"); templatePopup.setHeight("75px"); templatePopup.setStyleName("okm-Popup"); conversionStatus = new ConversionStatus(); omrPopup = new OmrPopup(); omrPopup.setWidth("150px"); omrPopup.setHeight("75px"); omrPopup.setStyleName("okm-Popup"); registerPFXPopup = new RegisterPFXPopup(); registerPFXPopup.setStyleName("okm-Popup"); previewPopup = new PreviewPopup(); previewPopup.setStyleName("okm-Popup"); retentionPolicyPopup = new RetentionPolicyPopup(); stampPopup = new StampPopup(); // Get grid 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"); //RootPanel.get().add(new Test()); //RootPanel.get().add(new Test2()); //RootPanel.get().add(new Test3()); RootPanel.get().add(mainPanel); RootPanel.get().add(dragable); Window.addWindowClosingHandler(new ClosingHandler() { @Override public void onWindowClosing(ClosingEvent event) { Main.get().windowClosing = true; startUp.keepAlive.cancel(); if (Main.get().mainPanel.bottomPanel.userInfo.isConnectedToChat()) { Main.get().mainPanel.bottomPanel.userInfo.logoutChat(); } } }); // Sets the active folder tree, it'll be used to store the active folder // every time switching stack panel activeFolderTree = mainPanel.desktop.navigator.taxonomyTree; // Initialize on startup when all objects are created sequentially startUpPopup.show(); startUp = new StartUp(); startUp.init(); // Auto-publish the method into JS when the GWT module loads. initJavaScriptApi(); mainPanel.topPanel.toolBar.initJavaScriptApi(mainPanel.topPanel.toolBar); fileUpload.initJavaScriptApi(); new NavigatorComunicator().initJavaScriptApi(); // Initialize commonUI public js api CommonUI commonUI = new CommonUI(); commonUI.initJavaScriptApi(commonUI); }
From source file:com.jitlogic.zico.client.ZicoEP.java
License:Open Source License
public void onModuleLoad() { Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() { @Override// w w w . j av a2 s . com public void execute() { Window.enableScrolling(false); shell = injector.getShell(); RootLayoutPanel.get().add(shell); } }); }
From source file:com.kobol.webclient.client.main.view.MainPageSmartGwtView.java
License:LGPL
@Inject public MainPageSmartGwtView(Masthead masthead, ApplicationMenu applicationMenu, NavigationPaneHeader navigationPaneHeader, NavigationPane navigationPane) { this.masthead = masthead; this.applicationMenu = applicationMenu; this.navigationPaneHeader = navigationPaneHeader; this.navigationPane = navigationPane; // get rid of scroll bars, 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(DEFAULT_MARGIN); // initialise the main layout container panel = new VLayout(); panel.setWidth100();//from w ww . j av a 2s . c o m panel.setHeight100(); // initialise the North layout container northLayout = new HLayout(); northLayout.setHeight(NORTH_HEIGHT); initApplicationMenu(); // initialise the nested layout container VLayout vLayout = new VLayout(); vLayout.addMember(this.masthead); vLayout.addMember(this.applicationMenu); vLayout.addMember(this.navigationPaneHeader); // add the nested layout container to the North layout container northLayout.addMember(vLayout); initNavigationPane(); // initialise the West layout container westLayout = this.navigationPane; // initialise the South layout container southLayout = new HLayout(); // add the North and South layout containers to the main layout // container panel.addMember(northLayout); panel.addMember(southLayout); }