Browse Source

Merge remote-tracking branch 'origin/release/11.0' into release/11.0

newui
John.Ying-应志浩 2 years ago
parent
commit
7453147267
  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

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

Loading…
Cancel
Save