Browse Source

Merge pull request #12081 in DESIGN/design from final/10.0 to release/10.0

* commit '42339dbe9bb5352c3c5fbbcc16fd7fbf239bed42':
  REPORT-94597 安装【平台内打开标签页】插件,FR图表超链会多两个重复下拉项 改用ListMap
  REPORT-94597 安装【平台内打开标签页】插件,FR图表超链会多两个重复下拉项
security/10.0
superman 2 years ago
parent
commit
27d3ddffa1
  1. 15
      designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java

15
designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java

@ -152,24 +152,23 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane {
setPlot(plot);
HashMap paneMap = getHyperlinkMap(plot);
//安装平台内打开插件时,添加相应按钮
Set<HyperlinkProvider> providers = ExtraDesignClassManager.getInstance().getArray(HyperlinkProvider.XML_TAG);
java.util.List<UIMenuNameableCreator> list = refreshList(paneMap);
Map<String, NameObjectCreator> creators = new ListMap<>();
int size = list.size();
NameObjectCreator[] creators = new NameObjectCreator[list.size() + providers.size()];
for (int i = 0; i < size; i++) {
UIMenuNameableCreator uiMenuNameableCreator = list.get(i);
creators[i] = new NameObjectCreator(uiMenuNameableCreator.getName(), uiMenuNameableCreator.getObj().getClass(), uiMenuNameableCreator.getPaneClazz());
NameObjectCreator creator = new NameObjectCreator(uiMenuNameableCreator.getName(), uiMenuNameableCreator.getObj().getClass(), uiMenuNameableCreator.getPaneClazz());
creators.put(uiMenuNameableCreator.getName(), creator);
}
//安装平台内打开插件时, 添加/替换 相应按钮
Set<HyperlinkProvider> providers = ExtraDesignClassManager.getInstance().getArray(HyperlinkProvider.XML_TAG);
for (HyperlinkProvider provider : providers) {
NameableCreator creator = provider.createHyperlinkCreator();
if (creator != null) {
creators[size] = new NameObjectCreator(creator.menuName(), creator.getHyperlink(), creator.getUpdatePane());
size++;
creators.put(creator.menuName(), new NameObjectCreator(creator.menuName(), creator.getHyperlink(), creator.getUpdatePane()));
}
}
refreshNameableCreator(creators);
refreshNameableCreator(creators.values().toArray(new NameObjectCreator[0]));
java.util.List<NameObject> nameObjects = new ArrayList<NameObject>();

Loading…
Cancel
Save