本文整理了Java中org.fujion.component.Window.setOnCanClose()
方法的一些代码示例,展示了Window.setOnCanClose()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.setOnCanClose()
方法的具体详情如下:
包路径:org.fujion.component.Window
类名称:Window
方法名:setOnCanClose
[英]Sets the functional interface that will determine if window closure is permitted.
[中]设置用于确定是否允许关闭窗口的功能界面。
代码示例来源:origin: org.fujion/fujion-core
/**
* Sets whether window closure is permitted using a simple Boolean value. This is a shortcut for
* calling {@link #setOnCanClose} with a functional interface that returns a fixed Boolean
* value.
*
* @param canClose If true, the tab may be closed.
*/
public void setOnCanClose(boolean canClose) {
setOnCanClose(() -> canClose);
}
代码示例来源:origin: org.carewebframework/org.carewebframework.ui.core
@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();
}
}
代码示例来源:origin: org.carewebframework/org.carewebframework.shell
window.setOnCanClose(() -> {
if (favoritesChanged) {
PropertyUtil.saveValues(DesignConstants.DESIGN_FAVORITES_PROPERTY, null, false, favorites);
内容来源于网络,如有侵权,请联系作者删除!