From 97d781caaf74a6f26ab98b15143a2333c6527d90 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Fri, 21 Jul 2017 11:47:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E8=A3=85=E5=B9=B3=E5=8F=B0=E5=86=85?= =?UTF-8?q?=E6=89=93=E5=BC=80=E6=8F=92=E4=BB=B6=EF=BC=8C=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E8=B6=85=E9=93=BE=E4=B8=AD=E6=B7=BB=E5=8A=A0=E7=9B=B8=E5=BA=94?= =?UTF-8?q?=E7=9A=84=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/controlpane/AbstractNameableCreator.java | 9 +++++++++ .../fr/design/gui/controlpane/NameableCreator.java | 5 ++++- .../chart/gui/other/ChartInteractivePane.java | 11 +++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/gui/controlpane/AbstractNameableCreator.java b/designer_base/src/com/fr/design/gui/controlpane/AbstractNameableCreator.java index 36a760b5b1..b3bb6f9d5e 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/AbstractNameableCreator.java +++ b/designer_base/src/com/fr/design/gui/controlpane/AbstractNameableCreator.java @@ -4,6 +4,7 @@ import com.fr.base.BaseUtils; import com.fr.design.beans.BasicBeanPane; import com.fr.general.ComparatorUtils; import com.fr.general.NameObject; +import com.fr.js.AbstractJavaScript; import javax.swing.*; @@ -70,6 +71,14 @@ public abstract class AbstractNameableCreator implements NameableCreator { return this.clazzOfEditor; } + /** + * get clazzOfObject + * @return clazzOfObject + */ + public Class getClazz() { + return this.clazzOfObject; + } + /** * * @param ob diff --git a/designer_base/src/com/fr/design/gui/controlpane/NameableCreator.java b/designer_base/src/com/fr/design/gui/controlpane/NameableCreator.java index f497be1e6c..eb26e21813 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/NameableCreator.java +++ b/designer_base/src/com/fr/design/gui/controlpane/NameableCreator.java @@ -2,6 +2,7 @@ package com.fr.design.gui.controlpane; import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.ilist.ListModelElement; +import com.fr.js.AbstractJavaScript; import com.fr.stable.Nameable; import javax.swing.*; @@ -16,7 +17,9 @@ public interface NameableCreator { public Nameable createNameable(UnrepeatedNameHelper helper); public Class getUpdatePane(); - + + public Class getClazz(); + public Object acceptObject2Populate(Object ob); public void saveUpdatedBean(ListModelElement wrapper, Object bean); diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java index f8b002bcf4..0250000f9c 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java @@ -12,6 +12,7 @@ import com.fr.chart.chartdata.GisMapTableDefinition; import com.fr.chart.web.ChartHyperPoplink; import com.fr.chart.web.ChartHyperRelateCellLink; import com.fr.chart.web.ChartHyperRelateFloatLink; +import com.fr.design.ExtraDesignClassManager; import com.fr.design.beans.BasicBeanPane; import com.fr.design.chart.javascript.ChartEmailPane; import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperPoplinkPane; @@ -21,6 +22,8 @@ import com.fr.design.chart.series.SeriesCondition.impl.FormHyperlinkPane; import com.fr.design.dialog.BasicScrollPane; import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserverListener; +import com.fr.design.fun.HyperlinkProvider; +import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.frpane.UIBubbleFloatPane; import com.fr.design.gui.frpane.UICorrelationComboBoxPane; import com.fr.design.gui.ibutton.UIButton; @@ -53,6 +56,7 @@ import java.text.DecimalFormat; import java.text.Format; import java.util.ArrayList; import java.util.List; +import java.util.Set; public class ChartInteractivePane extends BasicScrollPane implements UIObserver{ private static final long serialVersionUID = 3477409806918835992L; @@ -655,6 +659,13 @@ public class ChartInteractivePane extends BasicScrollPane implements UIOb private void populateHyperlink(Plot plot) { HashMap paneMap = renewMapWithPlot(plot); + //安装平台内打开插件时,添加相应按钮 + Set providers = ExtraDesignClassManager.getInstance().getArray(HyperlinkProvider.XML_TAG); + for (HyperlinkProvider provider : providers) { + NameableCreator nc = provider.createHyperlinkCreator(); + paneMap.put(nc.getClazz(), nc.getUpdatePane()); + } + List list = refreshList(paneMap); superLink.refreshMenuAndAddMenuAction(list);