com.haulmont.cuba.gui.config.WindowConfig.getWindows()方法的使用及代码示例

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

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

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

相关文章