|
|
@ -2,45 +2,29 @@ package com.fr.van.chart.custom.component; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.base.BaseFormula; |
|
|
|
import com.fr.base.BaseFormula; |
|
|
|
import com.fr.chart.chartattr.Plot; |
|
|
|
import com.fr.chart.chartattr.Plot; |
|
|
|
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.ExtraDesignClassManager; |
|
|
|
import com.fr.design.beans.BasicBeanPane; |
|
|
|
import com.fr.design.beans.BasicBeanPane; |
|
|
|
import com.fr.design.chart.javascript.ChartEmailPane; |
|
|
|
import com.fr.design.chart.javascript.ChartEmailPane; |
|
|
|
import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperPoplinkPane; |
|
|
|
|
|
|
|
import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperRelateCellLinkPane; |
|
|
|
|
|
|
|
import com.fr.design.chart.series.SeriesCondition.impl.ChartHyperRelateFloatLinkPane; |
|
|
|
|
|
|
|
import com.fr.design.chart.series.SeriesCondition.impl.FormHyperlinkPane; |
|
|
|
|
|
|
|
import com.fr.design.designer.TargetComponent; |
|
|
|
import com.fr.design.designer.TargetComponent; |
|
|
|
import com.fr.design.fun.HyperlinkProvider; |
|
|
|
import com.fr.design.fun.HyperlinkProvider; |
|
|
|
import com.fr.design.gui.controlpane.NameObjectCreator; |
|
|
|
import com.fr.design.gui.controlpane.NameObjectCreator; |
|
|
|
import com.fr.design.gui.controlpane.NameableCreator; |
|
|
|
import com.fr.design.gui.controlpane.NameableCreator; |
|
|
|
import com.fr.design.hyperlink.ReportletHyperlinkPane; |
|
|
|
|
|
|
|
import com.fr.design.hyperlink.WebHyperlinkPane; |
|
|
|
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.design.javascript.JavaScriptImplPane; |
|
|
|
import com.fr.design.module.DesignModuleFactory; |
|
|
|
import com.fr.design.javascript.ParameterJavaScriptPane; |
|
|
|
|
|
|
|
import com.fr.general.NameObject; |
|
|
|
import com.fr.general.NameObject; |
|
|
|
import com.fr.js.EmailJavaScript; |
|
|
|
import com.fr.js.EmailJavaScript; |
|
|
|
import com.fr.js.FormHyperlinkProvider; |
|
|
|
|
|
|
|
import com.fr.js.JavaScript; |
|
|
|
import com.fr.js.JavaScript; |
|
|
|
import com.fr.js.JavaScriptImpl; |
|
|
|
|
|
|
|
import com.fr.js.NameJavaScript; |
|
|
|
import com.fr.js.NameJavaScript; |
|
|
|
import com.fr.js.NameJavaScriptGroup; |
|
|
|
import com.fr.js.NameJavaScriptGroup; |
|
|
|
import com.fr.js.ParameterJavaScript; |
|
|
|
|
|
|
|
import com.fr.js.ReportletHyperlink; |
|
|
|
|
|
|
|
import com.fr.js.WebHyperlink; |
|
|
|
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
|
|
|
import com.fr.stable.ListMap; |
|
|
|
import com.fr.stable.Nameable; |
|
|
|
import com.fr.stable.Nameable; |
|
|
|
import com.fr.stable.bridge.StableFactory; |
|
|
|
|
|
|
|
import com.fr.van.chart.designer.component.VanChartUIListControlPane; |
|
|
|
import com.fr.van.chart.designer.component.VanChartUIListControlPane; |
|
|
|
|
|
|
|
|
|
|
|
import java.lang.reflect.Constructor; |
|
|
|
import java.lang.reflect.Constructor; |
|
|
|
import java.lang.reflect.InvocationTargetException; |
|
|
|
import java.lang.reflect.InvocationTargetException; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Set; |
|
|
|
import java.util.Set; |
|
|
|
|
|
|
|
|
|
|
@ -55,36 +39,22 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public NameableCreator[] createNameableCreators() { |
|
|
|
public NameableCreator[] createNameableCreators() { |
|
|
|
|
|
|
|
//面板初始化
|
|
|
|
List<NameableCreator> creators = new ArrayList<NameableCreator>(); |
|
|
|
Map<String, NameableCreator> nameCreators = new ListMap<>(); |
|
|
|
|
|
|
|
NameableCreator[] creators = DesignModuleFactory.getHyperlinkGroupType().getHyperlinkCreators(); |
|
|
|
creators.add(new NameObjectCreator(Toolkit.i18nText("Fine-Design_Chart_Link_Reportlet"), |
|
|
|
for (NameableCreator creator : creators) { |
|
|
|
ReportletHyperlink.class, ReportletHyperlinkPane.class)); |
|
|
|
nameCreators.put(creator.menuName(), creator); |
|
|
|
creators.add(new NameObjectCreator(Toolkit.i18nText("Fine-Design_Chart_Link_Mail"), EmailJavaScript.class, VanChartEmailPane.class)); |
|
|
|
} |
|
|
|
creators.add(new NameObjectCreator(Toolkit.i18nText("Fine-Design_Chart_Link_Web"), |
|
|
|
//使用chart的email替换掉报表的email
|
|
|
|
WebHyperlink.class, WebHyperlinkPane.class)); |
|
|
|
String email = Toolkit.i18nText("Fine-Design_Basic_Email"); |
|
|
|
creators.add(new NameObjectCreator(Toolkit.i18nText("Fine-Design_Chart_Link_Dynamic_Parameters"), |
|
|
|
nameCreators.put(email, new NameObjectCreator(email, EmailJavaScript.class, ChartEmailPane.NoRename.class)); |
|
|
|
ParameterJavaScript.class, ParameterJavaScriptPane.class)); |
|
|
|
|
|
|
|
creators.add(new NameObjectCreator("JavaScript", JavaScriptImpl.class, JavaScriptImplPane.class)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
creators.add(new NameObjectCreator(Toolkit.i18nText("Fine-Design_Chart_Float_Chart"), |
|
|
|
|
|
|
|
ChartHyperPoplink.class, ChartHyperPoplinkPane.class)); |
|
|
|
|
|
|
|
creators.add(new NameObjectCreator(Toolkit.i18nText("Fine-Design_Chart_Link_Cell"), |
|
|
|
|
|
|
|
ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.class)); |
|
|
|
|
|
|
|
creators.add(new NameObjectCreator(Toolkit.i18nText("Fine-Design_Chart_Link_Float"), |
|
|
|
|
|
|
|
ChartHyperRelateFloatLink.class, ChartHyperRelateFloatLinkPane.class)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FormHyperlinkProvider hyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class); |
|
|
|
|
|
|
|
creators.add(new NameObjectCreator(Toolkit.i18nText("Fine-Design_Chart_Link_Form"), |
|
|
|
|
|
|
|
hyperlink.getClass(), FormHyperlinkPane.class)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Set<HyperlinkProvider> providers = ExtraDesignClassManager.getInstance().getArray(HyperlinkProvider.XML_TAG); |
|
|
|
Set<HyperlinkProvider> providers = ExtraDesignClassManager.getInstance().getArray(HyperlinkProvider.XML_TAG); |
|
|
|
for (HyperlinkProvider provider : providers) { |
|
|
|
for (HyperlinkProvider provider : providers) { |
|
|
|
NameableCreator nc = provider.createHyperlinkCreator(); |
|
|
|
NameableCreator nc = provider.createHyperlinkCreator(); |
|
|
|
creators.add(nc); |
|
|
|
nameCreators.put(nc.menuName(), nc); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return nameCreators.values().toArray(new NameableCreator[nameCreators.size()]); |
|
|
|
return creators.toArray(new NameableCreator[creators.size()]); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -144,22 +114,6 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane { |
|
|
|
//populate
|
|
|
|
//populate
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* updateJs的Group |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @return 返回NameJavaScriptGroup |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public NameJavaScriptGroup updateJSGroup() { |
|
|
|
|
|
|
|
Nameable[] res = this.update(); |
|
|
|
|
|
|
|
NameJavaScript[] res_array = new NameJavaScript[res.length]; |
|
|
|
|
|
|
|
for (int i = 0; i < res.length; i++) { |
|
|
|
|
|
|
|
NameObject no = (NameObject) res[i]; |
|
|
|
|
|
|
|
res_array[i] = new NameJavaScript(no.getName(), (JavaScript) no.getObject()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new NameJavaScriptGroup(res_array); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void populate(Plot plot) { |
|
|
|
public void populate(Plot plot) { |
|
|
|
setPlot(plot); |
|
|
|
setPlot(plot); |
|
|
|
|
|
|
|
|
|
|
@ -208,27 +162,4 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane { |
|
|
|
|
|
|
|
|
|
|
|
return nameGroup; |
|
|
|
return nameGroup; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected Class<? extends BasicBeanPane> getUseMap(HashMap map, Object key) { |
|
|
|
|
|
|
|
if (map.get(key) != null) { |
|
|
|
|
|
|
|
return (Class<? extends BasicBeanPane>) map.get(key); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//引擎在这边放了个provider,当前表单对象
|
|
|
|
|
|
|
|
for (Object tempKey : map.keySet()) { |
|
|
|
|
|
|
|
if (((Class) tempKey).isAssignableFrom((Class) key)) { |
|
|
|
|
|
|
|
return (Class<? extends BasicBeanPane>) map.get(tempKey); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//邮箱
|
|
|
|
|
|
|
|
public static class VanChartEmailPane extends ChartEmailPane { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
protected boolean needRenamePane() { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|