List of usage examples for com.google.gwt.user.client Window getClientHeight
public static int getClientHeight()
From source file:com.cubusmail.gwtui.client.panels.contact.ContactsPanel.java
License:Open Source License
public ContactsPanel(RegionPosition readingPanePos) { super();/* www .ja v a 2s. c o m*/ setLayout(new BorderLayout()); setPaddings(10); setBorder(false); BorderLayoutData data = new BorderLayoutData(RegionPosition.CENTER); add(PanelRegistry.CONTACT_LIST_PANEL.get(), data); this.readingPaneLayoutData = new BorderLayoutData(readingPanePos); this.readingPaneLayoutData.setSplit(true); if (readingPanePos.equals(RegionPosition.SOUTH)) { PanelRegistry.CONTACT_READING_PANE.get().setHeight((Window.getClientHeight() - 80) / 2); } else { PanelRegistry.CONTACT_READING_PANE.get().setWidth(400); } add(PanelRegistry.CONTACT_READING_PANE.get(), this.readingPaneLayoutData); initActions(); createContextMenu(); }
From source file:com.cubusmail.gwtui.client.panels.MessagesPanel.java
License:Open Source License
/** * //from www .ja va 2 s .co m */ private void setReadingPaneState() { Preferences preferences = GWTSessionManager.get().getPreferences(); RegionPosition readingPanePos = null; if (preferences.getReadingPane() == Preferences.READING_PANE_RIGHT) { readingPanePos = RegionPosition.EAST; } else { readingPanePos = RegionPosition.SOUTH; } this.readingPaneLayoutData = new BorderLayoutData(readingPanePos); this.readingPaneLayoutData.setSplit(true); this.readingPanePanel = PanelRegistry.MESSAGE_READING_PANE_PREVIEW.get(); if (readingPanePos.equals(RegionPosition.SOUTH)) { this.readingPanePanel.setHeight((Window.getClientHeight() - 80) / 2); } else { this.readingPanePanel.setWidth(400); } add(this.readingPanePanel, this.readingPaneLayoutData); }
From source file:com.dimdim.conference.ui.common.client.util.DimdimPopupsLayoutManager.java
License:Open Source License
public void repositionPopups() { if (this.lastKnownWidth == 0) { this.lastKnownWidth = Window.getClientWidth(); }//from ww w . j av a 2s . c o m if (this.lastKnownHeight == 0) { this.lastKnownHeight = Window.getClientHeight(); } // Setup the available slots arrangement. this.analyzeScreen(); // Now move the popups around. this.rearrangePopups(); }
From source file:com.dimdim.conference.ui.common.client.util.DmGlassPanel.java
License:Open Source License
public DmGlassPanel(ModalDialog modalDialog) { this.modalDialog = modalDialog; Label l = new Label(" "); add(basePanel);//from w w w . j a v a 2 s. c o m l.addClickListener(this); basePanel.add(scrollPanel); scrollPanel.add(l); basePanel.setSize(Window.getClientWidth() + "px", Window.getClientHeight() + "px"); scrollPanel.setSize(Window.getClientWidth() + "px", Window.getClientHeight() + "px"); basePanel.setStyleName("common-glass-panel"); basePanel.setCellHorizontalAlignment(l, HorizontalPanel.ALIGN_CENTER); basePanel.setCellVerticalAlignment(l, VerticalPanel.ALIGN_MIDDLE); this.setPopupPosition(0, 0); }
From source file:com.dimdim.conference.ui.common.client.util.DmGlassPanel2.java
License:Open Source License
public DmGlassPanel2(NonModalPopupPanel popup) { this.popup = popup; Label l = new Label(" "); add(basePanel);//from w w w.ja v a 2 s . c om l.addClickListener(this); basePanel.add(scrollPanel); scrollPanel.add(l); basePanel.setSize(Window.getClientWidth() + "px", Window.getClientHeight() + "px"); l.setSize(Window.getClientWidth() + "px", Window.getClientHeight() + "px"); scrollPanel.setSize(Window.getClientWidth() + "px", Window.getClientHeight() + "px"); basePanel.setStyleName("common-glass-panel-2"); basePanel.setCellHorizontalAlignment(l, HorizontalPanel.ALIGN_CENTER); basePanel.setCellVerticalAlignment(l, VerticalPanel.ALIGN_MIDDLE); this.setPopupPosition(0, 0); }
From source file:com.dimdim.conference.ui.layout.client.main.NewLayout.java
License:Open Source License
public void onModuleLoad() { this.originalWidth = Window.getClientWidth(); this.minimumWidth = this.originalWidth; if (this.minimumWidth > 1024) { this.minimumWidth = 1024; }/* ww w . j a va 2s .c om*/ this.originalHeight = Window.getClientHeight(); this.minimumHeight = this.originalHeight; if (this.minimumHeight > 768) { this.minimumHeight = 768; } ConferenceGlobals.setContentWidth(Window.getClientWidth()); ConferenceGlobals.setContentHeight(Window.getClientHeight()); ConferenceGlobals.conferenceKey = getConfKey(); // lmm = new LoadingModuleMessage("Loading....."); //RootPanel.get("MainConsole").add(lmm); // lmm.setSize(Window.getClientWidth()+"px",Window.getClientHeight()+"px"); UIDataDictionaryManager.initManager(getWebAppName(), getConfKey(), getUserType(), new String[] { "dictionary", "dictionary", "dictionary", "dictionary", "dictionary" }, new String[] { "console", "console", "console", "global_string", "session_string" }, new String[] { "ui_strings", "tooltips", "default_layout", "emoticons", "user_info" + getDataCacheId() }); UIDataDictionaryManager.getManager().readDataDictionaries(this); }
From source file:com.dimdim.conference.ui.layout.client.main.NewLayout.java
License:Open Source License
protected void loadConsole() { DebugPanel.getDebugPanel().addDebugMessage("Initializing Console"); // Now once the environment i initialized the client model can be // created which depends on it. // String getEventsURL = ConferenceGlobals.webappRoot+ // "GetEvents.action?sessionKey="+ConferenceGlobals.sessionKey; String getEventsURL = ConferenceGlobals.webappRoot + "GetEvents.action?sessionKey=" + ConferenceGlobals.sessionKey; String serverPingURL = ConferenceGlobals.webappRoot + "PingServer.action"; ClientModel.createClientModel();/*from w w w. ja v a2 s. c o m*/ DebugPanel.getDebugPanel().addDebugMessage("Client model creation complete"); Window.setMargin("0px"); try { UIRosterEntry currentUser = ClientModel.getClientModel().getRosterModel().getCurrentUser(); fullPanel = new ConsoleFullPanel(this, currentUser); //RootPanel.get("MainConsole").remove(this.lmm); //RootPanel.get("MainConsole").add(fullPanel); //RootPanel.get("MainConsole").add(fullPanel.getTopPanel()) //this.meetingAssistent = new MeetingAssistentDialog(this.workspaceClickListener); } catch (Exception e) { Window.alert(e.getMessage()); } DebugPanel.getDebugPanel().addDebugMessage("Fetching initial data"); ClientModel.getClientModel().getClientStateModel().addListener(this.fullPanel.getMiddlePanel()); ClientModel.getClientModel().getRosterModel() .addListener(this.fullPanel.getMiddlePanel().getRosterModelListener()); UIParams uiParams = UIParams.getUIParams(); EventsJsonHandler eventsHandler = EventsJsonHandler.getHandler(); eventsHandler.setEventsTracker(DebugPanel.getDebugPanel()); gerth = new GetEventResponseTextHandler(eventsHandler, uiParams.getRegularEventPollIntervalMillis(), uiParams.getMaxEventPollErrors()); gerth.setServerPingURL(serverPingURL); eventsReadingTimer = new JSONurlReadingTimer(getEventsURL, getConfKey(), uiParams.getInitialEventPollDelayMillis(), gerth); gerth.setServerStatusListener(this.eventsReadingTimer); eventsReadingTimer.start(); Window.addWindowResizeListener(this); DeferredCommand.add(new Command() { public void execute() { onWindowResized(Window.getClientWidth(), Window.getClientHeight()); continueLoading(); } }); ClientModel.getClientModel().getRosterModel().reportConsoleLoaded(); // ConsoleDataReader dataReader = new ConsoleDataReader(this); // dataReader.readConsoleData(); DebugPanel.getDebugPanel().addDebugMessage("Console initialization complete."); showConsole(); // linking meeting assistant dialog listener meetingAssistent = new MeetingAssistentDialog(fullPanel.getMiddlePanel().getLeftPanel()); fullPanel.getTopPanel().getLinksPanel().getAssistantLabel().addClickListener(this); }
From source file:com.dimdim.conference.ui.layout2.client.MainLayout.java
License:Open Source License
public void onModuleLoad() { // this.originalWidth = Window.getClientWidth(); // this.minimumWidth = this.originalWidth; // if (this.minimumWidth > 1024) // {// w w w . j a v a 2 s .c o m // this.minimumWidth = 1024; // } // this.originalHeight = Window.getClientHeight(); // this.minimumHeight = this.originalHeight; // if (this.minimumHeight > 768) // { // this.minimumHeight = 768; // } ConferenceGlobals.setContentWidth(Window.getClientWidth()); ConferenceGlobals.setContentHeight(Window.getClientHeight()); ConferenceGlobals.conferenceKey = getConfKey(); // lmm = new LoadingModuleMessage("Loading....."); //RootPanel.get("MainConsole").add(lmm); // lmm.setSize(Window.getClientWidth()+"px",Window.getClientHeight()+"px"); UIDataDictionaryManager.initManager(getWebAppName(), getConfKey(), getUserType(), // new String[]{"dictionary","dictionary","dictionary","dictionary","dictionary"}, // new String[]{"console","console","console","global_string","session_string"}, // new String[]{"ui_strings","tooltips","default_layout","emoticons","user_info"+getDataCacheId()}); new String[] { "combined" }, new String[] { "session_string" }, new String[] { "user_info" + getDataCacheId() }); UIDataDictionaryManager.getManager().readDataDictionaries(this); }
From source file:com.dimdim.conference.ui.layout2.client.MainLayout.java
License:Open Source License
protected void loadConsole() { DebugPanel.getDebugPanel().addDebugMessage("Initializing Console"); // Now once the environment i initialized the client model can be // created which depends on it. // String getEventsURL = ConferenceGlobals.webappRoot+ // "GetEvents.action?sessionKey="+ConferenceGlobals.sessionKey; String getEventsURL = ConferenceGlobals.webappRoot + "GetEvents.action?sessionKey=" + ConferenceGlobals.sessionKey; String serverPingURL = ConferenceGlobals.webappRoot + "PingServer.action"; ClientModel.createClientModel();/*from ww w . j a v a 2 s . c o m*/ DebugPanel.getDebugPanel().addDebugMessage("Client model creation complete"); Window.setMargin("0px"); try { UIRosterEntry currentUser = ClientModel.getClientModel().getRosterModel().getCurrentUser(); fullPanel = new ConsoleFullPanel(this, currentUser); //RootPanel.get("MainConsole").remove(this.lmm); //RootPanel.get("MainConsole").add(fullPanel); //RootPanel.get("MainConsole").add(fullPanel.getTopPanel()) //this.meetingAssistent = new MeetingAssistentDialog(this.workspaceClickListener); } catch (Exception e) { Window.alert(e.getMessage()); } DebugPanel.getDebugPanel().addDebugMessage("Fetching initial data"); ClientModel.getClientModel().getClientStateModel().addListener(this.fullPanel.getMiddlePanel()); ClientModel.getClientModel().getRosterModel() .addListener(this.fullPanel.getMiddlePanel().getRosterModelListener()); UIParams uiParams = UIParams.getUIParams(); EventsJsonHandler eventsHandler = EventsJsonHandler.getHandler(); eventsHandler.setEventsTracker(DebugPanel.getDebugPanel()); gerth = new GetEventResponseTextHandler(eventsHandler, uiParams.getRegularEventPollIntervalMillis(), uiParams.getMaxEventPollErrors()); gerth.setServerPingURL(serverPingURL); eventsReadingTimer = new JSONurlReadingTimer(getEventsURL, getConfKey(), uiParams.getInitialEventPollDelayMillis(), gerth); gerth.setServerStatusListener(this.eventsReadingTimer); eventsReadingTimer.start(); resizeListener = new ResizeListener(); Window.addWindowResizeListener(resizeListener); DeferredCommand.addCommand(new Command() { public void execute() { resizeListener.onWindowResized(Window.getClientWidth(), Window.getClientHeight()); continueLoading(); } }); ClientModel.getClientModel().getRosterModel().reportConsoleLoaded(); // ConsoleDataReader dataReader = new ConsoleDataReader(this); // dataReader.readConsoleData(); DebugPanel.getDebugPanel().addDebugMessage("Console initialization complete."); JSInterface.addCallbackListener(CopyFlashListener.getListener()); // showConsole(); // linking meeting assistant dialog listener // meetingAssistent = new MeetingAssistentDialog(fullPanel.getMiddlePanel().getLeftPanel()); // fullPanel.getTopPanel().getToolsPanel().getAssistantLabel().addClickListener(this); }
From source file:com.dimdim.conference.ui.popout.client.PopoutWindow.java
License:Open Source License
/** * /*from ww w . ja v a 2 s. c o m*/ * */ public PopoutWindow(final String windowId, String panelId, PopoutWindowContent popoutWindowContent) { this.windowId = windowId; this.panelId = panelId; this.popoutWindowContent = popoutWindowContent; ClientModel.createClientModel(); // Window.alert("1"); Window.addWindowCloseListener(this); resizeListener = new PopoutResizeListener(); Window.addWindowResizeListener(resizeListener); popoutWindowContent.preparePopoutWindowContent(); // Window.alert("2"); this.eventsTextHandler = new PopoutPageEventTextHandler(EventsJsonHandler.getHandler()); // Window.alert("3"); this.dataTextHandler = new PopoutPageDataTextHandler(windowId, popoutWindowContent, this.eventsTextHandler); // Window.alert("4"); this.dataReader = new PopoutPageDataReader(100, this.dataTextHandler); // Window.alert("5"); // this.dataReader.start(); // Window.alert("6"); this.eventsReader = new PopoutPageEventsReader(1000, this.eventsTextHandler); // Window.alert("7"); // this.eventsReader.start(); // Window.alert("8"); // Window.alert("9"); DeferredCommand.add(new Command() { public void execute() { resizeListener.onWindowResized(Window.getClientWidth(), Window.getClientHeight()); String popoutLoadedMessage = "{objClass:\"PopoutPanelData\",windowId:\"" + windowId + "\",panelId:\"" + windowId + "\",dataText:\"POPOUT_LOADED\"}"; reportPopoutLoadedToConsole(popoutLoadedMessage); } }); // Window.alert("10"); }