本文整理了Java中org.fujion.component.Window.getAttribute()
方法的一些代码示例,展示了Window.getAttribute()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.getAttribute()
方法的具体详情如下:
包路径:org.fujion.component.Window
类名称:Window
方法名:getAttribute
暂无
代码示例来源:origin: org.carewebframework/org.carewebframework.ui.core
@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();
}
代码示例来源:origin: org.carewebframework/org.carewebframework.shell
/**
* Creates a property grid for the given target UI element.
*
* @param target UI element whose properties are to be edited.
* @param parent Parent component for property grid (may be null).
* @param embedded If true, the property grid is embedded within another component.
* @return Newly created PropertyGrid instance.
*/
public static PropertyGrid create(ElementBase target, BaseComponent parent, boolean embedded) {
Map<String, Object> args = new HashMap<>();
args.put("target", target);
args.put("embedded", embedded);
Window window = (Window) PageUtil.createPage(DesignConstants.RESOURCE_PREFIX + "propertyGrid.fsp", parent, args)
.get(0);
if (parent == null) {
window.modal(null);
}
return window.getAttribute("controller", PropertyGrid.class);
}
代码示例来源:origin: org.hspconsortium.carewebframework/cwf-ui-patientselection-core
/**
* Invokes the patient match dialog, displaying the specified list of patients.
*
* @param patientList List of patients from which to select.
* @param callback Callback to receive the patient selected by the user or null if the operation
* was canceled.
*/
public static void selectFromList(List<Patient> patientList, IResponseCallback<Patient> callback) {
Map<String, Object> args = new HashMap<>();
args.put(Constants.RESULT_ATTRIB, patientList);
Window window = (Window) PageUtil.createPage(Constants.RESOURCE_PREFIX + "patientMatches.fsp", null, args).get(0);
window.modal(callback == null ? null : (event) -> {
callback.onComplete(window.getAttribute(Constants.RESULT_ATTRIB, Patient.class));
});
}
代码示例来源:origin: org.carewebframework/org.carewebframework.ui.core
/**
* Displays the date range dialog.
*
* @param dateRange The initial date range.
* @param callback Callback for returning a date range reflecting the inputs from the dialog.
* This will be null if the input is cancelled or if an unexpected error occurs.
*/
public static void show(DateRange dateRange, IResponseCallback<DateRange> callback) {
Map<String, Object> args = new HashMap<>();
args.put("dateRange", dateRange);
Window dlg = (Window) PageUtil.createPage(DialogConstants.RESOURCE_PREFIX + "dateRangeDialog.fsp", null, args)
.get(0);
dlg.modal((event) -> {
callback.onComplete((DateRange) dlg.getAttribute("result"));
});
}
代码示例来源:origin: org.carewebframework/org.carewebframework.shell
/**
* Display the Layout Manager dialog
*
* @param rootElement The root UI element.
*/
public static void execute(ElementBase rootElement) {
Window dlg = getInstance(true);
dlg.getAttribute("controller", LayoutDesigner.class).init(rootElement);
dlg.popup(null);
}
代码示例来源:origin: org.carewebframework/org.carewebframework.ui.core
/**
* Prompt user for input.
*
* @param args The argument map.
* @param callback The callback to receive the text input. If the dialog was cancelled, the text
* input will be returned as null.
*/
public static void show(Map<String, Object> args, IInputCallback callback) {
Window dialog = (Window) PageUtil
.createPage(DialogConstants.RESOURCE_PREFIX + "inputDialog.fsp", ExecutionContext.getPage(), args).get(0);
dialog.modal(callback == null ? null : (event) -> {
callback.onComplete(dialog.getAttribute("result", String.class));
});
}
代码示例来源: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();
}
}
内容来源于网络,如有侵权,请联系作者删除!