Browse Source

CHART-10247 扩展图表兼容

research/11.0
白岳 5 years ago
parent
commit
87cadd7049
  1. 8
      designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java
  2. 2
      designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java
  3. 2
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java
  4. 2
      designer-chart/src/main/java/com/fr/extended/chart/ExtendedTypePane.java

8
designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java

@ -165,7 +165,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
ChartWidgetOption[] child = new ChartWidgetOption[chartIDs.length];
int index = 0;
for (String chartID : chartIDs) {
ChartProvider[] rowChart = ChartTypeManager.getInstance().getChartTypes(chartID);
ChartProvider[] rowChart = ChartTypeManager.getInstance().getCharts(chartID);
if (ArrayUtils.isEmpty(rowChart) && !ChartTypeManager.innerChart(chartID)) {
continue;
}
@ -364,7 +364,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
try {
//兼容 图表类型选择界面会调到这边
ChartProvider[] charts = ChartTypeManager.getInstanceWithCheck().getChartTypes(chartID);
ChartProvider[] charts = ChartTypeManager.getInstanceWithCheck().getCharts(chartID);
result = new String[charts.length];
for (int i = 0; i < charts.length; i++) {
//Chart && AbstractChart
@ -403,7 +403,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
//兼容
private String[] getCompatibleSubName(String chartID, ChartTypeUIProvider provider) {
ChartProvider[] chartProviders = ChartTypeManager.getInstanceWithCheck().getChartTypes(chartID);
ChartProvider[] chartProviders = ChartTypeManager.getInstanceWithCheck().getCharts(chartID);
if (chartProviders.length == 1) {
return new String[]{getName(chartID)};
@ -453,7 +453,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
try {
ChartProvider chartProvider = ChartTypeManager.getInstanceWithCheck().getChartTypes(chartID)[0];
ChartProvider chartProvider = ChartTypeManager.getInstanceWithCheck().getCharts(chartID)[0];
if (chartProvider instanceof Chart) {
//AbstractExtendedChartUIProvider
result = ((Chart) chartProvider).getChartName();

2
designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java

@ -126,7 +126,7 @@ public class ChartTypePane extends ChartCommonWizardPane {
ChartProvider chart4Update = cc.getSelectedChartProvider();
if (chart4Update == null) {
String plotID = this.chartIDs[mainTypeList.getSelectedIndex()];
ChartProvider chart = ChartTypeManager.getInstance().getChartTypes(plotID)[iconViewList.getSelectedIndex()];
ChartProvider chart = ChartTypeManager.getInstance().getCharts(plotID)[iconViewList.getSelectedIndex()];
try {
chart4Update = (ChartProvider) chart.clone();
cc.addChart(chart4Update);

2
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java

@ -125,7 +125,7 @@ public class ChartTypePane extends AbstractChartAttrPane{
try{
AbstractChartTypePane selectedPane = (AbstractChartTypePane) getSelectedPane();
ChartProvider newDefaultChart =(ChartProvider) ChartTypeManager.getInstanceWithCheck().getChartTypes(selectedPane.getPlotID())[0].clone();
ChartProvider newDefaultChart =(ChartProvider) ChartTypeManager.getInstanceWithCheck().getCharts(selectedPane.getPlotID())[0].clone();
if (!ComparatorUtils.equals(chart.getClass(), newDefaultChart.getClass())) {
//vanChart 和 chart 之间切换
//不同chart之间切换

2
designer-chart/src/main/java/com/fr/extended/chart/ExtendedTypePane.java

@ -67,7 +67,7 @@ public class ExtendedTypePane<T extends AbstractChart> extends AbstractChartType
@Override
public ChartProvider getDefaultChart() {
return ChartTypeManager.getInstance().getChartTypes(getPlotID())[0];
return ChartTypeManager.getInstance().getCharts(getPlotID())[0];
}
@Override

Loading…
Cancel
Save