Browse Source

Merge pull request #432 in BA/design from ~XIAOHU/design:dev to dev

* commit '7f71d2ec5bee55ad0ecef401e70a05ba383021b9':
  异步请求图片
master
superman 8 years ago
parent
commit
b6df1dda23
  1. 19
      designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java

19
designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java

@ -87,6 +87,20 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames();
ChartWidgetOption[] child = new ChartWidgetOption[typeName.length];
//异步加载
new Thread(new Runnable() {
@Override
public void run() {
getWidgetOption(typeName, child);
}
}).start();
return child;
}
private static void getWidgetOption(ChartInternationalNameContentBean[] typeName, ChartWidgetOption[] child){
for (int i = 0; i < typeName.length; i++) {
String plotID = typeName[i].getPlotID();
Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID);
@ -94,14 +108,15 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
continue;
}
//初始化图表模型图片
//加载初始化图表模型图片
initChartsDemoImage(rowChart);
String iconPath = ChartTypeInterfaceManager.getInstance().getIconPath(plotID);
Icon icon = IOUtils.readIcon(iconPath);
child[i] = new ChartWidgetOption(Inter.getLocText(typeName[i].getName()), icon, ChartEditor.class, rowChart[0]);
}
return child;
DesignModuleFactory.registerExtraWidgetOptions(child);
}
private static void initChartsDemoImage(Chart[] rowChart) {

Loading…
Cancel
Save