From 82098262df1974400f4b9b093eda65cd3121566d Mon Sep 17 00:00:00 2001 From: pengda Date: Thu, 10 Mar 2022 14:32:59 +0800 Subject: [PATCH] =?UTF-8?q?CHART-22972=20HyperlinkProvider=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=AF=B9=E5=9B=BE=E8=A1=A8=E8=B6=85=E9=93=BE=E4=B8=8D?= =?UTF-8?q?=E8=B5=B7=E4=BD=9C=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../custom/component/VanChartHyperLinkPane.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java index b5efad3b66..d50d5811c2 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java @@ -150,17 +150,16 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane { //安装平台内打开插件时,添加相应按钮 Set providers = ExtraDesignClassManager.getInstance().getArray(HyperlinkProvider.XML_TAG); - for (HyperlinkProvider provider : providers) { - NameableCreator nc = provider.createHyperlinkCreator(); - paneMap.put(nc.getHyperlink(), nc.getUpdatePane()); - } - java.util.List list = refreshList(paneMap); - NameObjectCreator[] creators = new NameObjectCreator[list.size()]; - for (int i = 0; list != null && i < list.size(); i++) { + 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()); - + } + for (HyperlinkProvider provider : providers) { + creators[size] = new NameObjectCreator(provider.text(), provider.target(), provider.appearance()); + size++; } refreshNameableCreator(creators);