org.fujion.component.Window.close()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(85)

本文整理了Java中org.fujion.component.Window.close()方法的一些代码示例,展示了Window.close()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.close()方法的具体详情如下:
包路径:org.fujion.component.Window
类名称:Window
方法名:close

Window.close介绍

[英]Request the window to be closed. Window closure may be prevented if the onCanClose logic returns false.
[中]请求关闭窗口。如果onCanClose逻辑返回false,则可以防止窗口关闭。

代码示例

代码示例来源:origin: org.carewebframework/org.carewebframework.shell

/**
 * Clicking cancel button discards changes and closes viewer.
 */
@EventHandler(value = "click", target = "btnCancel")
private void onClick$btnCancel() {
  window.close();
}

代码示例来源:origin: org.carewebframework/org.carewebframework.ui.core

/**
 * Retrieve the response and close the dialog.
 *
 * @param component The component associated with the response.
 */
private void close(BaseComponent component) {
  response = component == null ? null : (DialogResponse<?>) component.getData();
  root.close();
}

代码示例来源:origin: org.fujion/fujion-core

/**
 * Handles close events from the client.
 */
@EventHandler(value = "close", syncToClient = false, mode = "init")
private void _close() {
  close();
}

代码示例来源:origin: org.carewebframework/org.carewebframework.help.core

/**
 * Close the window. If this is a local window, simply hide it. If it is a remote window, close
 * the browser window entirely.
 *
 * @see org.carewebframework.help.IHelpViewer#close()
 */
@Override
public void close() {
  root.close();
  
  if (mode != HelpViewerMode.EMBEDDED) {
    ClientUtil.invoke("window.close");
  }
}

代码示例来源:origin: org.carewebframework/org.carewebframework.ui.core

@EventHandler(value = "click", target = "btnClose")
private void btnClose$click() {
  window.close();
}

代码示例来源:origin: org.carewebframework/org.carewebframework.shell

/**
 * Close the dialog if it is open.
 */
public static void closeDialog() {
  Window dlg = getInstance(false);
  
  if (dlg != null) {
    dlg.close();
  }
}

代码示例来源:origin: org.carewebframework/org.carewebframework.shell

/**
 * Close dialog without further action.
 */
@EventHandler(value = "click", target = "btnCancel")
private void onClick$btnCancel() {
  window.close();
}

代码示例来源:origin: org.carewebframework/org.carewebframework.ui.core

/**
 * Clicking the cancel button aborts the input.
 */
@EventHandler(value = "click", target = "btnCancel")
private void onClick$btnCancel() {
  root.close();
}

代码示例来源:origin: org.carewebframework/org.carewebframework.shell

@EventHandler(value = "click", target = "btnCancel")
private void onClick$btnCancel() {
  window.close();
}

代码示例来源:origin: org.carewebframework/org.carewebframework.shell

@EventHandler(value = "click", target = "btnClose")
private void onClick$btnClose() {
  window.close();
}

代码示例来源:origin: org.carewebframework/org.carewebframework.ui.core

@EventHandler(value = "click", target = "btnClose")
private void onClose$btnClose() {
  root.close();
}

代码示例来源:origin: org.carewebframework/org.carewebframework.shell

/**
 * Clicking OK button commits changes and closes viewer.
 */
@EventHandler(value = "click", target = "btnOK")
private void onClick$btnOK() {
  if (commit()) {
    window.close();
  }
}

代码示例来源:origin: org.carewebframework/org.carewebframework.shell

/**
 * Clicking the OK button commits any pending edits and closes the dialog.
 */
@EventHandler(value = "click", target = "@btnOK")
private void onClick$btnOK() {
  if (commitChanges(true)) {
    window.close();
  }
}

代码示例来源:origin: org.carewebframework/org.carewebframework.shell

private void close(LayoutIdentifier layoutId) {
  window.setAttribute("layoutId", layoutId);
  LayoutManager.defaultIsShared(layoutId.shared);
  window.close();
}

代码示例来源:origin: org.carewebframework/org.carewebframework.ui.core

@EventHandler(value = "click", target = "btnCancel")
  private void onCancel() {
    root.setAttribute("result", null);
    root.close();
  }
}

代码示例来源:origin: org.carewebframework/org.carewebframework.shell

/**
 * Clicking the cancel button cancels any pending edits and, if embedded mode is not active,
 * closes the dialog.
 */
@EventHandler(value = "click", target = "@btnCancel")
private void onClick$btnCancel() {
  if (embedded) {
    commitChanges(false);
  } else {
    window.close();
  }
}

代码示例来源:origin: org.carewebframework/org.carewebframework.shell

/**
 * 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();
  }
}

代码示例来源:origin: org.carewebframework/org.carewebframework.shell

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();
  }
}

代码示例来源:origin: org.carewebframework/org.carewebframework.ui.core

@EventHandler(value = "enter", target = "@textbox")
@EventHandler(value = "click", target = "@btnOK")
private void onCommit() {
  root.setAttribute("result", textbox.getValue());
  root.close();
}

代码示例来源:origin: org.carewebframework/org.carewebframework.ui.core

/**
 * 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();
}

相关文章