@Override protected void extend(final ServerConnector target) { textFieldWidget = (VTextField) ((ComponentConnector) target).getWidget(); textFieldWidget.setImmediate(true); textFieldWidget.textChangeEventMode = "EAGER"; panel.setWidget(select); panel.setStyleName("suggestion-popup"); panel.setOwner(textFieldWidget); textFieldWidget.addKeyUpHandler(new KeyUpHandler() { @Override public void onKeyUp(final KeyUpEvent event) { if (panel.isAttached()) { handlePanelEventDelegation(event); } else if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) { rpc.executeQuery(textFieldWidget.getValue(), textFieldWidget.getCursorPos()); } else { doAskForSuggestion(); } } }); }
@Override protected void extend(final ServerConnector target) { textFieldWidget = (VTextField) ((ComponentConnector) target).getWidget(); textFieldWidget.setImmediate(true); textFieldWidget.textChangeEventMode = "EAGER"; panel.setWidget(select); panel.setStyleName("suggestion-popup"); panel.setOwner(textFieldWidget); textFieldWidget.addKeyUpHandler(new KeyUpHandler() { @Override public void onKeyUp(final KeyUpEvent event) { if (panel.isAttached()) { handlePanelEventDelegation(event); } else if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) { rpc.executeQuery(textFieldWidget.getValue(), textFieldWidget.getCursorPos()); } else { doAskForSuggestion(); } } }); }
protected void createDescriptionPopup() { descriptionPopup = new VOverlay(); descriptionPopup.setOwner(getOwner()); descriptionPopup.setStylePrimaryName("aceeditor-suggestpopup-description"); HTML lbl = new HTML(); lbl.setWordWrap(true); descriptionPopup.setWidget(lbl); updateDescriptionPopupPosition(); descriptionPopup.setWidth(DESCRIPTION_WIDTH+"px"); // descriptionPopup.setSize(DESCRIPTION_WIDTH+"px", HEIGHT+"px"); }
private void createDescriptionPopup() { descriptionPopup = new VOverlay(); descriptionPopup.setOwner(getOwner()); descriptionPopup.setStylePrimaryName("aceeditor-suggestpopup-description"); HTML lbl = new HTML(); lbl.setWordWrap(true); descriptionPopup.setWidget(lbl); updateDescriptionPopupPosition(); descriptionPopup.setWidth(DESCRIPTION_WIDTH+"px"); // descriptionPopup.setSize(DESCRIPTION_WIDTH+"px", HEIGHT+"px"); }
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.setWidget(dockButton); dockButtonContainer.show();
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); } }
sortDirectionPopup.setWidget(sortDirectionMenu);