本文整理了Java中com.haulmont.cuba.gui.config.WindowConfig.getWindows()
方法的一些代码示例,展示了WindowConfig.getWindows()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WindowConfig.getWindows()
方法的具体详情如下:
包路径:com.haulmont.cuba.gui.config.WindowConfig
类名称:WindowConfig
方法名:getWindows
[英]All registered screens
[中]所有注册屏幕
代码示例来源:origin: com.haulmont.addon.dashboard/dashboard-web
protected List<String> getAllScreensIds() {
return windowConfig.getWindows().stream()
.map(WindowInfo::getId)
.collect(Collectors.toList());
}
代码示例来源:origin: com.haulmont.cuba/cuba-web
protected Set<String> getAllWindowIds() {
Collection<WindowInfo> windows = windowConfig.getWindows();
return windows.stream()
.map(WindowInfo::getId)
.collect(Collectors.toSet());
}
}
代码示例来源:origin: com.haulmont.cuba/cuba-gui
private void walkOtherScreens(Node<BasicPermissionTarget> othersRoot, Node<BasicPermissionTarget> menuRoot) {
Set<String> menuItems = new HashSet<>();
for (Node<BasicPermissionTarget> node : new Tree<>(menuRoot).toList()) {
menuItems.add(node.getData().getId());
}
// filter non-unique windows with specified agent
windowConfig.getWindows().stream()
.map(WindowInfo::getId)
.filter(id -> !menuItems.contains("item:" + id))
.distinct()
.sorted()
.forEach(id -> {
Node<BasicPermissionTarget> n = new Node<>(new BasicPermissionTarget("item:" + id, id, id));
othersRoot.addChild(n);
});
}
代码示例来源:origin: com.haulmont.addon.dashboard/dashboard-web
protected List<String> getAllLookupIds() {
Collection<WindowInfo> allWindows = windowConfig.getWindows();
List<String> lookupIds = new ArrayList<>();
for (WindowInfo winInfo : allWindows) {
if (isNotBlank(winInfo.getTemplate()) && isLookupWindow(winInfo)) {
lookupIds.add(winInfo.getId());
} else if (winInfo.getScreenClass() != null &&
AbstractLookup.class.isAssignableFrom(winInfo.getScreenClass())) {
lookupIds.add(winInfo.getId());
}
}
filterLookupFields(lookupIds);
return lookupIds;
}
代码示例来源:origin: com.haulmont.cuba/cuba-gui
Collection<WindowInfo> windowInfoCollection = windowConfig.getWindows();
screensMap = new TreeMap<>();
代码示例来源:origin: com.haulmont.addon.dashboard/dashboard-web
protected void init() {
widgetTypeInfos = new ArrayList<>();
try {
for (WindowInfo windowInfo : windowConfig.getWindows()) {
DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
if (StringUtils.isNoneEmpty(windowInfo.getTemplate())) {
代码示例来源:origin: com.haulmont.reports/reports-gui
protected void initScreens() {
screenTable.addAction(new RemoveAction(screenTable, false));
List<WindowInfo> windowInfoCollection = new ArrayList<>(windowConfig.getWindows());
代码示例来源:origin: com.haulmont.cuba/cuba-gui
protected void initScreenFilter() {
WindowConfig windowConfig = AppBeans.get(WindowConfig.NAME);
Collection<WindowInfo> windows = sortWindowInfos(windowConfig.getWindows());
Map<String, String> screens = new LinkedHashMap<>();
for (WindowInfo windowInfo : windows) {
String id = windowInfo.getId();
String menuId = "menu-config." + id;
String localeMsg = messages.getMessage(AppConfig.getMessagesPack(), menuId);
String title = menuId.equals(localeMsg) ? id : localeMsg + " (" + id + ")";
screens.put(title, id);
}
screenFilter.setOptionsMap(screens);
componentsTreeBtn.setEnabled(screenFilter.getValue() != null);
screenFilter.addValueChangeListener(e -> {
componentsTreeBtn.setEnabled(screenFilter.getValue() != null);
componentDescriptorsDs.setScreenId(screenFilter.getValue());
componentDescriptorsDs.refresh();
componentsTree.expandTree();
});
}
内容来源于网络,如有侵权,请联系作者删除!