List of usage examples for com.google.gwt.user.client Window getClientHeight
public static int getClientHeight()
From source file:com.openkm.extension.frontend.client.widget.openmeetings.finddocument.FindDocumentSelectPopup.java
License:Open Source License
/** * Shows the popup //from w ww .j a va 2s. c o m */ public void show(long roomId) { this.roomId = roomId; initButtons(); int left = (Window.getClientWidth() - 700) / 2; int top = (Window.getClientHeight() - 350) / 2; setPopupPosition(left, top); setText(GeneralComunicator.i18n("search.document.filter")); // Resets to initial tree value removeAllRows(); keyword.setText(""); evaluateEnableAction(); super.show(); keyword.setFocus(true); }
From source file:com.openkm.frontend.client.widget.ErrorPopup.java
License:Open Source License
/** * Show the popup error/*from w ww . ja v a 2 s . c om*/ * * @param msg Error message */ public void show(String msg) { //TODO: aqui pueden haber problemas de concurrencia al ser llamado simultaneamente este mtodo // cabe la posibilidad de perder algun mensaje de error. if (!text.getHTML().equals("")) { text.setHTML(text.getHTML() + "<br><br>" + msg); } else { text.setHTML(msg); } setText(Main.i18n("error.label")); int left = (Window.getClientWidth() - 380) / 2; int top = (Window.getClientHeight() - 200) / 2; setPopupPosition(left, top); super.show(); }
From source file:com.openkm.frontend.client.widget.findsimilar.FindSimilarDocumentSelectPopup.java
License:Open Source License
/** * Shows the popup /*from w ww . ja v a 2 s . c om*/ */ public void show() { initButtons(); int left = (Window.getClientWidth() - 700) / 2; int top = (Window.getClientHeight() - 350) / 2; setPopupPosition(left, top); setText(Main.i18n("search.similar.document")); // Resets to initial tree value removeAllRows(); evaluateEnableAction(); super.show(); }
From source file:com.openkm.frontend.client.widget.form.FolderSelectPopup.java
License:Open Source License
/** * Shows the popup // w w w. j a v a2s .c om */ public void show(TextBox textBox, HasPropertyHandler propertyHandler) { this.textBox = textBox; this.propertyHandler = propertyHandler; int left = (Window.getClientWidth() - 300) / 2; int top = (Window.getClientHeight() - 200) / 2; setPopupPosition(left, top); // Resets to initial tree value folderSelectTree.reset(); GWTWorkspace workspace = Main.get().workspaceUserProperties.getWorkspace(); categoriesVisible = workspace.isStackCategoriesVisible(); thesaurusVisible = workspace.isStackThesaurusVisible(); templatesVisible = workspace.isStackTemplatesVisible(); personalVisible = workspace.isStackPersonalVisible(); mailVisible = workspace.isStackMailVisible(); removeAllContextListItems(); contextListBox.addItem(Main.i18n("leftpanel.label.taxonomy"), "" + UIDesktopConstants.NAVIGATOR_TAXONOMY); if (categoriesVisible) { contextListBox.addItem(Main.i18n("leftpanel.label.categories"), "" + UIDesktopConstants.NAVIGATOR_CATEGORIES); } if (thesaurusVisible) { contextListBox.addItem(Main.i18n("leftpanel.label.thesaurus"), "" + UIDesktopConstants.NAVIGATOR_THESAURUS); } if (templatesVisible) { contextListBox.addItem(Main.i18n("leftpanel.label.templates"), "" + UIDesktopConstants.NAVIGATOR_TEMPLATES); } if (personalVisible) { contextListBox.addItem(Main.i18n("leftpanel.label.my.documents"), "" + UIDesktopConstants.NAVIGATOR_PERSONAL); } if (mailVisible) { contextListBox.addItem(Main.i18n("leftpanel.label.mail"), "" + UIDesktopConstants.NAVIGATOR_MAIL); } super.show(); }
From source file:com.openkm.frontend.client.widget.MsgPopup.java
License:Open Source License
@Override public void show() { setPopupPosition(Window.getClientWidth() - (550 + 20), Window.getClientHeight() - (290 + 80)); evaluateButtons();/*from w w w. j a va 2 s.c o m*/ super.show(); }
From source file:com.openkm.frontend.client.widget.PropertyGroupPopup.java
License:Open Source License
/** * Show the popup error/*from w w w .j a v a 2 s .c om*/ * * @param msg Error message */ public void show() { setText(Main.i18n("group.label")); getAllGroups(); // Gets all groups addButton.setEnabled(false); int left = (Window.getClientWidth() - 300) / 2; int top = (Window.getClientHeight() - 100) / 2; setPopupPosition(left, top); super.show(); }
From source file:com.openkm.frontend.client.widget.searchin.FolderSelectPopup.java
License:Open Source License
/** * Shows the popup /*from w w w .j a v a2 s.c o m*/ */ public void show(boolean categories) { this.categories = categories; int left = (Window.getClientWidth() - 450) / 2; int top = (Window.getClientHeight() - 300) / 2; setPopupPosition(left, top); if (categories) { setText(Main.i18n("search.category.filter")); } else { setText(Main.i18n("search.folder.filter")); } // Resets to initial tree value folderSelectTree.reset(categories); super.show(); }
From source file:com.openkm.frontend.client.widget.security.SecurityPopup.java
License:Open Source License
/** * Show the security popup//from w w w . j a v a 2 s . c o m */ public void show(String uuid) { this.uuid = uuid; int left = (Window.getClientWidth() - width) / 2; int top = (Window.getClientHeight() - 400) / 2; setPopupPosition(left, top); setText(Main.i18n("security.label")); securityPanel.reset(uuid); change.setEnabled(false); super.show(); // TODO:Solves minor bug with IE if (Util.getUserAgent().startsWith("ie")) { securityPanel.tabPanel.setWidth(String.valueOf(width)); securityPanel.tabPanel.setWidth(String.valueOf((width + 1))); } // Fill width must be done on visible widgets securityPanel.fillWidth(); }
From source file:com.ponysdk.core.terminal.ui.PTPopupPanel.java
License:Apache License
@Override public void addHandler(final ReaderBuffer buffer, final HandlerModel handlerModel) { if (HandlerModel.HANDLER_POPUP_POSITION == handlerModel) { uiObject.setVisible(true);// w w w. ja v a 2 s .c o m uiObject.show(); Scheduler.get().scheduleDeferred(() -> { final PTInstruction eventInstruction = new PTInstruction(getObjectID()); final JSONArray widgetInfo = new JSONArray(); int i = 0; widgetInfo.set(i++, new JSONNumber(uiObject.getOffsetWidth())); widgetInfo.set(i++, new JSONNumber(uiObject.getOffsetHeight())); widgetInfo.set(i++, new JSONNumber(Window.getClientWidth())); widgetInfo.set(i++, new JSONNumber(Window.getClientHeight())); eventInstruction.put(ClientToServerModel.POPUP_POSITION, widgetInfo); uiBuilder.sendDataToServer(uiObject, eventInstruction); }); } else { super.addHandler(buffer, handlerModel); } }
From source file:com.ponysdk.ui.terminal.ui.PTPopupPanel.java
License:Apache License
@Override public void addHandler(final PTInstruction addHandler, final UIService uiService) { final String handler = addHandler.getString(HANDLER.KEY); if (HANDLER.KEY_.POPUP_POSITION_CALLBACK.equals(handler)) { final PopupPanel popupPanel = cast(); popupPanel.setVisible(false);/*from w w w.j a va 2s. co m*/ popupPanel.show(); final PTInstruction eventInstruction = new PTInstruction(); eventInstruction.setObjectID(addHandler.getObjectID()); eventInstruction.put(TYPE.KEY, TYPE.KEY_.EVENT); eventInstruction.put(HANDLER.KEY, HANDLER.KEY_.POPUP_POSITION_CALLBACK); eventInstruction.put(PROPERTY.OFFSETWIDTH, popupPanel.getOffsetWidth()); eventInstruction.put(PROPERTY.OFFSETHEIGHT, popupPanel.getOffsetHeight()); eventInstruction.put(PROPERTY.CLIENT_WIDTH, Window.getClientWidth()); eventInstruction.put(PROPERTY.CLIENT_HEIGHT, Window.getClientHeight()); uiService.triggerEvent(eventInstruction); return; } super.addHandler(addHandler, uiService); }