Browse Source

REPORT-94597 安装【平台内打开标签页】插件,FR图表超链会多两个重复下拉项

newui
Levy.Xie 2 years ago
parent
commit
0d866f10c4
  1. 20
      designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java

20
designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java

@ -47,10 +47,7 @@ import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.*;
/**
* Created by Fangjie on 2016/4/28.
@ -154,24 +151,23 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane {
}
HashMap paneMap = getHyperlinkMap();
//安装平台内打开插件时,添加相应按钮
Set<HyperlinkProvider> providers = ExtraDesignClassManager.getInstance().getArray(HyperlinkProvider.XML_TAG);
java.util.List<UIMenuNameableCreator> list = refreshList(paneMap);
Map<String, NameObjectCreator> creators = new LinkedHashMap<>();
int size = list.size();
NameObjectCreator[] creators = new NameObjectCreator[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());
NameObjectCreator creator = new NameObjectCreator(uiMenuNameableCreator.getName(), uiMenuNameableCreator.getObj().getClass(), uiMenuNameableCreator.getPaneClazz());
creators.put(uiMenuNameableCreator.getName(), creator);
}
//安装平台内打开插件时, 添加/替换 相应按钮
Set<HyperlinkProvider> providers = ExtraDesignClassManager.getInstance().getArray(HyperlinkProvider.XML_TAG);
for (HyperlinkProvider provider : providers) {
NameableCreator creator = provider.createHyperlinkCreator();
if (creator != null) {
creators[size] = new NameObjectCreator(creator.menuName(), creator.getHyperlink(), creator.getUpdatePane());
size++;
creators.put(creator.menuName(), new NameObjectCreator(creator.menuName(), creator.getHyperlink(), creator.getUpdatePane()));
}
}
refreshNameableCreator(creators);
refreshNameableCreator(creators.values().toArray(new NameObjectCreator[0]));
}
public void populate(Plot plot) {

Loading…
Cancel
Save