@Override public void afterInitialized(BaseComponent comp) { root = (Window) comp; root.setAttribute("controller", this); init(); }
private void returnResult(PluginDefinition definition) { if (definition != null) { childElement = createChild ? definition.createElement(parentElement, null, false) : null; if (childElement instanceof ElementUI) { ((ElementUI) childElement).bringToFront(); } window.setAttribute("pluginDefinition", definition); window.setAttribute("childElement", childElement); window.close(); } }
private void close(LayoutIdentifier layoutId) { window.setAttribute("layoutId", layoutId); LayoutManager.defaultIsShared(layoutId.shared); window.close(); }
@EventHandler(value = "click", target = "btnCancel") private void onCancel() { root.setAttribute("result", null); root.close(); } }
/** * Sets the selected layout and closes the dialog. */ @EventHandler(value = "click", target = "@btnOK") private void onClick$btnOK() { LayoutIdentifier id = getSelectedLayout(); if (id != null) { window.setAttribute("layoutId", id); window.close(); } }
@EventHandler(value = "enter", target = "@textbox") @EventHandler(value = "click", target = "@btnOK") private void onCommit() { root.setAttribute("result", textbox.getValue()); root.close(); }
/** * Clicking the OK button creates a DateRangeItem object with the responses from the dialog and * closes the dialog. */ @EventHandler(value = "click", target = "btnOK") private void onClick$btnOK() { if (startDate.getValue().after(endDate.getValue())) { Datebox temp = startDate; startDate = endDate; endDate = temp; } DateRange dateRange = new DateRange(null, startDate.getValue(), endDate.getValue()); root.setAttribute("result", dateRange); root.close(); }
@Override public void afterInitialized(BaseComponent comp) { this.root = (Window) comp; root.setAttribute("controller", this); root.setTitle(root.getAttribute("title", "")); root.addClass("flavor:" + root.getAttribute("panelClass", "panel-primary")); prompt.setLabel(root.getAttribute("prompt", "")); textbox.setValue(root.getAttribute("oldValue", null)); textbox.selectAll(); updateState(); }
@Override public void afterInitialized(BaseComponent comp) { this.root = (Window) comp; root.setAttribute("controller", this); control = (DialogControl<?>) root.getAttribute("control"); root.setTitle(control.getTitle()); icon.addClass(control.getIconClass()); message.addClass(control.getTextClass()); message.setLabel(control.getMessage()); root.addClass(control.getPanelClass()); chkRemember.setVisible(root.hasAttribute("remember")); root.setOnCanClose(() -> { control.callback(response); return true; }); if (control.getFormat() == ChoiceFormat.BUTTONS) { processButtonResponses(); } else { processListResponses(); } }