@Override public void activate(ActivationEvent event) { active = true; activationMessage = event.getActivationMessage(); overlay = new VOverlay(); overlay.addStyleName("v-window"); overlay.addStyleName("v-touchkit-offlinemode"); Style style = overlay.getElement().getStyle(); style.setZIndex(Z_INDEX); // Make sure this is overloading the indicator flowPanel = new FlowPanel(); overlay.add(flowPanel); buildDefaultContent(); overlay.show(); overlay.setWidth(Window.getClientWidth() + "px"); overlay.setHeight(Window.getClientHeight() + "px"); }
@Override public void onClick(ClickEvent event) { overlay = new VOverlay(true, true); overlay.setStyleName(B.css().android23SelectOverlay()); overlay.setGlassEnabled(true); overlay.setGlassStyleName(B.css().android23SelectOverlayGlass()); overlay.add(options); TouchScrollDelegate.enableTouchScrolling(overlay, overlay.getElement()); overlay.center(); } });
public void showCustomPopup() { if (this.customPopupWidget != null) { if (this.customPopupWidget instanceof HasWidgets) { if (!((HasWidgets) this.customPopupWidget).iterator().hasNext()) { // there are no component to show return; } } // Store the currently focused element, which will be re-focused when // context menu is closed Element focusedElement = WidgetUtil.getFocusedElement(); this.customPopupOverlay = Tools.createCubaTablePopup(this.customPopupAutoClose); this.customPopupOverlay.setOwner(table); this.customPopupOverlay.setWidget(this.customPopupWidget); this.customPopupOverlay.addCloseHandler(e -> { Element currentFocus = WidgetUtil.getFocusedElement(); if (focusedElement != null && (currentFocus == null || customPopupOverlay.getElement().isOrHasChild(currentFocus) || RootPanel.getBodyElement().equals(currentFocus))) { focusedElement.focus(); } customPopupOverlay = null; }); Tools.showPopup(this.customPopupOverlay, this.lastClickClientX, this.lastClickClientY); } }
public void showContextMenuPopup(int left, int top) { if (this.customContextMenu instanceof HasWidgets) { if (!((HasWidgets) this.customContextMenu).iterator().hasNext()) { // there are no actions to show return; } } // Store the currently focused element, which will be re-focused when // context menu is closed Element focusedElement = WidgetUtil.getFocusedElement(); this.customContextMenuPopup = Tools.createCubaTableContextMenu(); this.customContextMenuPopup.setOwner(table); this.customContextMenuPopup.setWidget(this.customContextMenu); this.customContextMenuPopup.addCloseHandler(e -> { Element currentFocus = WidgetUtil.getFocusedElement(); if (focusedElement != null && (currentFocus == null || customContextMenuPopup.getElement().isOrHasChild(currentFocus) || RootPanel.getBodyElement().equals(currentFocus))) { focusedElement.focus(); } customContextMenuPopup = null; }); Tools.showPopup(this.customContextMenuPopup, left, top); }
dockButtonContainer.getElement().getStyle().setZIndex(9999);
public void showPresentationEditorPopup(Event event, Widget presentationsEditIcon) { if (event.getEventTarget().cast() == presentationsEditIcon.getElement() && tableWidget.isEnabled()) { this.presentationsEditorPopup = new VOverlay(); this.presentationsEditorPopup.setStyleName("c-table-prefs-editor"); this.presentationsEditorPopup.setOwner(table); this.presentationsEditorPopup.setWidget(this.presentationsMenu); // Store the currently focused element, which will be re-focused when // context menu is closed Element focusedElement = WidgetUtil.getFocusedElement(); this.presentationsEditorPopup.addCloseHandler(e -> { Element currentFocus = WidgetUtil.getFocusedElement(); if (focusedElement != null && (currentFocus == null || presentationsEditorPopup.getElement().isOrHasChild(currentFocus) || RootPanel.getBodyElement().equals(currentFocus))) { focusedElement.focus(); } presentationsEditorPopup = null; }); this.presentationsEditorPopup.setAutoHideEnabled(true); this.presentationsEditorPopup.showRelativeTo(presentationsEditIcon); } }