|
|
@ -1,7 +1,6 @@ |
|
|
|
package com.fr.design.chart; |
|
|
|
package com.fr.design.chart; |
|
|
|
/** |
|
|
|
/** |
|
|
|
* the Pane of the Chart |
|
|
|
* the Pane of the Chart |
|
|
|
* |
|
|
|
|
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.chart.base.ChartInternationalNameContentBean; |
|
|
|
import com.fr.chart.base.ChartInternationalNameContentBean; |
|
|
@ -120,15 +119,16 @@ public class ChartTypePane extends ChartCommonWizardPane { |
|
|
|
ChartProvider[] sub_charts = ChartTypePane.this.charts4Icon[main_index]; |
|
|
|
ChartProvider[] sub_charts = ChartTypePane.this.charts4Icon[main_index]; |
|
|
|
ChartTypePane.this.iconListModel.clear(); |
|
|
|
ChartTypePane.this.iconListModel.clear(); |
|
|
|
for (int i = 0; i < sub_charts.length; i++) { |
|
|
|
for (int i = 0; i < sub_charts.length; i++) { |
|
|
|
ChartTypePane.this.iconListModel.addElement(new ChartIcon(sub_charts[i])); |
|
|
|
String ImagePath = sub_charts[i].demoImagePath(); |
|
|
|
|
|
|
|
String chartName = sub_charts[i].getChartName(); |
|
|
|
|
|
|
|
ChartTypePane.this.iconListModel.addElement(new ChartIcon(ImagePath, chartName)); |
|
|
|
} |
|
|
|
} |
|
|
|
iconViewList.setSelectedIndex(0); |
|
|
|
iconViewList.setSelectedIndex(0); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
public String getChartName(ChartIcon chartIcon) { |
|
|
|
public String getChartName(ChartIcon chartIcon) { |
|
|
|
ChartProvider chart = chartIcon.getChart(); |
|
|
|
return chartIcon.getChartName(); |
|
|
|
return ChartTypeManager.getInstanceWithCheck().getChartName(chart.getID()); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void populate(ChartProvider chart) { |
|
|
|
public void populate(ChartProvider chart) { |
|
|
@ -146,10 +146,10 @@ public class ChartTypePane extends ChartCommonWizardPane { |
|
|
|
if (chart4Update == null) { |
|
|
|
if (chart4Update == null) { |
|
|
|
String plotID = typeName[mainTypeList.getSelectedIndex()].getChartID(); |
|
|
|
String plotID = typeName[mainTypeList.getSelectedIndex()].getChartID(); |
|
|
|
ChartProvider chart = ChartTypeManager.getInstance().getChartTypes(plotID)[iconViewList.getSelectedIndex()]; |
|
|
|
ChartProvider chart = ChartTypeManager.getInstance().getChartTypes(plotID)[iconViewList.getSelectedIndex()]; |
|
|
|
try{ |
|
|
|
try { |
|
|
|
chart4Update = (ChartProvider) chart.clone(); |
|
|
|
chart4Update = (ChartProvider) chart.clone(); |
|
|
|
cc.addChart(chart4Update); |
|
|
|
cc.addChart(chart4Update); |
|
|
|
}catch (CloneNotSupportedException ex){ |
|
|
|
} catch (CloneNotSupportedException ex) { |
|
|
|
FineLoggerFactory.getLogger().error(ex.getMessage(), ex); |
|
|
|
FineLoggerFactory.getLogger().error(ex.getMessage(), ex); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|