Browse Source

安装平台内打开插件,图表超链中添加相应的按钮

master
mengao 7 years ago
parent
commit
97d781caaf
  1. 9
      designer_base/src/com/fr/design/gui/controlpane/AbstractNameableCreator.java
  2. 5
      designer_base/src/com/fr/design/gui/controlpane/NameableCreator.java
  3. 11
      designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java

9
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 <? extends AbstractJavaScript>getClazz() {
return this.clazzOfObject;
}
/**
*
* @param ob

5
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<? extends BasicBeanPane> getUpdatePane();
public Class <? extends AbstractJavaScript>getClazz();
public Object acceptObject2Populate(Object ob);
public void saveUpdatedBean(ListModelElement wrapper, Object bean);

11
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<Chart> implements UIObserver{
private static final long serialVersionUID = 3477409806918835992L;
@ -655,6 +659,13 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
private void populateHyperlink(Plot plot) {
HashMap paneMap = renewMapWithPlot(plot);
//安装平台内打开插件时,添加相应按钮
Set<HyperlinkProvider> providers = ExtraDesignClassManager.getInstance().getArray(HyperlinkProvider.XML_TAG);
for (HyperlinkProvider provider : providers) {
NameableCreator nc = provider.createHyperlinkCreator();
paneMap.put(nc.getClazz(), nc.getUpdatePane());
}
List<UIMenuNameableCreator> list = refreshList(paneMap);
superLink.refreshMenuAndAddMenuAction(list);

Loading…
Cancel
Save