From 743b4fb1aa45b01697e920c1ab1bead6768f7ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Tue, 8 Oct 2019 11:22:49 +0800 Subject: [PATCH] =?UTF-8?q?CHART-10233=20=E4=BB=A3=E7=A0=81=E8=B4=A8?= =?UTF-8?q?=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chartx/component/HyperLinkPane.java | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/chartx/component/HyperLinkPane.java b/designer-chart/src/main/java/com/fr/design/chartx/component/HyperLinkPane.java index b3236fd6a..4b737fbd5 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/component/HyperLinkPane.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/component/HyperLinkPane.java @@ -61,9 +61,7 @@ import java.awt.Component; */ public class HyperLinkPane extends UIListControlPane implements UIObserver { - NameJavaScriptGroup nameGroup; - - HashMap hyperLinkEditorMap; + private Map hyperLinkEditorMap; private UIObserverListener uiObserverListener; @@ -152,13 +150,11 @@ public class HyperLinkPane extends UIListControlPane implements UIObserver { } - public void populate(NameJavaScriptGroup nameGroup, HashMap hyperLinkEditorMap) { - this.nameGroup = nameGroup; - if (this.hyperLinkEditorMap == null) { - this.hyperLinkEditorMap = hyperLinkEditorMap; - } + public void populate(NameJavaScriptGroup nameGroup, Map hyperLinkEditorMap) { + + this.hyperLinkEditorMap = hyperLinkEditorMap; - HashMap paneMap = getHyperlinkMap(); + Map paneMap = getHyperlinkMap(); //安装平台内打开插件时,添加相应按钮 Set providers = ExtraDesignClassManager.getInstance().getArray(HyperlinkProvider.XML_TAG); @@ -193,8 +189,8 @@ public class HyperLinkPane extends UIListControlPane implements UIObserver { doLayout(); } - private HashMap getHyperlinkMap() { - HashMap map = new HashMap(); + private Map getHyperlinkMap() { + Map map = new HashMap(); map.put(ReportletHyperlink.class, ReportletHyperlinkPane.class); map.put(EmailJavaScript.class, ChartEmailPane.class); @@ -210,7 +206,7 @@ public class HyperLinkPane extends UIListControlPane implements UIObserver { return map; } - private List refreshList(HashMap map) { + private List refreshList(Map map) { List list = new ArrayList(); list.add(new UIMenuNameableCreator(Toolkit.i18nText("Fine-Design_Chart_Link_Reportlet"), @@ -236,7 +232,7 @@ public class HyperLinkPane extends UIListControlPane implements UIObserver { return list; } - private Class getUseMap(HashMap map, Object key) { + private Class getUseMap(Map map, Object key) { if (map.get(key) != null) { return (Class) map.get(key); }