Browse Source

Merge pull request #1156 in DESIGN/design from ~BJORN/design:feature/10.0 to feature/10.0

* commit '87cadd7049ee6db85fff76b02e026f28c28354b2':
  CHART-10247 扩展图表兼容
  CHART-10247 热力地图-界面图片不对&扩展图表变成条形图
research/11.0
Bjorn 5 years ago
parent
commit
65fb7dd093
  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. 12
      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
  5. 7
      designer-chart/src/main/java/com/fr/van/chart/heatmap/designer/HeatMapIndependentVanChartInterface.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]; ChartWidgetOption[] child = new ChartWidgetOption[chartIDs.length];
int index = 0; int index = 0;
for (String chartID : chartIDs) { for (String chartID : chartIDs) {
ChartProvider[] rowChart = ChartTypeManager.getInstance().getChartTypes(chartID); ChartProvider[] rowChart = ChartTypeManager.getInstance().getCharts(chartID);
if (ArrayUtils.isEmpty(rowChart) && !ChartTypeManager.innerChart(chartID)) { if (ArrayUtils.isEmpty(rowChart) && !ChartTypeManager.innerChart(chartID)) {
continue; continue;
} }
@ -364,7 +364,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
try { try {
//兼容 图表类型选择界面会调到这边 //兼容 图表类型选择界面会调到这边
ChartProvider[] charts = ChartTypeManager.getInstanceWithCheck().getChartTypes(chartID); ChartProvider[] charts = ChartTypeManager.getInstanceWithCheck().getCharts(chartID);
result = new String[charts.length]; result = new String[charts.length];
for (int i = 0; i < charts.length; i++) { for (int i = 0; i < charts.length; i++) {
//Chart && AbstractChart //Chart && AbstractChart
@ -403,7 +403,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
//兼容 //兼容
private String[] getCompatibleSubName(String chartID, ChartTypeUIProvider provider) { private String[] getCompatibleSubName(String chartID, ChartTypeUIProvider provider) {
ChartProvider[] chartProviders = ChartTypeManager.getInstanceWithCheck().getChartTypes(chartID); ChartProvider[] chartProviders = ChartTypeManager.getInstanceWithCheck().getCharts(chartID);
if (chartProviders.length == 1) { if (chartProviders.length == 1) {
return new String[]{getName(chartID)}; return new String[]{getName(chartID)};
@ -453,7 +453,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
try { try {
ChartProvider chartProvider = ChartTypeManager.getInstanceWithCheck().getChartTypes(chartID)[0]; ChartProvider chartProvider = ChartTypeManager.getInstanceWithCheck().getCharts(chartID)[0];
if (chartProvider instanceof Chart) { if (chartProvider instanceof Chart) {
//AbstractExtendedChartUIProvider //AbstractExtendedChartUIProvider
result = ((Chart) chartProvider).getChartName(); 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(); ChartProvider chart4Update = cc.getSelectedChartProvider();
if (chart4Update == null) { if (chart4Update == null) {
String plotID = this.chartIDs[mainTypeList.getSelectedIndex()]; String plotID = this.chartIDs[mainTypeList.getSelectedIndex()];
ChartProvider chart = ChartTypeManager.getInstance().getChartTypes(plotID)[iconViewList.getSelectedIndex()]; ChartProvider chart = ChartTypeManager.getInstance().getCharts(plotID)[iconViewList.getSelectedIndex()];
try { try {
chart4Update = (ChartProvider) chart.clone(); chart4Update = (ChartProvider) chart.clone();
cc.addChart(chart4Update); cc.addChart(chart4Update);

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

@ -19,15 +19,15 @@ import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
/** /**
* 图表 属性表, 类型选择 界面. * 图表 属性表, 类型选择 界面.
@ -124,7 +124,8 @@ public class ChartTypePane extends AbstractChartAttrPane{
String lastPlotID = chart.getID(); String lastPlotID = chart.getID();
try{ try{
ChartProvider newDefaultChart = (ChartProvider) ((AbstractChartTypePane) getSelectedPane()).getDefaultChart().clone(); AbstractChartTypePane selectedPane = (AbstractChartTypePane) getSelectedPane();
ChartProvider newDefaultChart =(ChartProvider) ChartTypeManager.getInstanceWithCheck().getCharts(selectedPane.getPlotID())[0].clone();
if (!ComparatorUtils.equals(chart.getClass(), newDefaultChart.getClass())) { if (!ComparatorUtils.equals(chart.getClass(), newDefaultChart.getClass())) {
//vanChart 和 chart 之间切换 //vanChart 和 chart 之间切换
//不同chart之间切换 //不同chart之间切换
@ -135,7 +136,6 @@ public class ChartTypePane extends AbstractChartAttrPane{
}catch (CloneNotSupportedException e){ }catch (CloneNotSupportedException e){
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
} }
//这一步会替换plot //这一步会替换plot
((AbstractChartTypePane)getSelectedPane()).updateBean(chart); ((AbstractChartTypePane)getSelectedPane()).updateBean(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 @Override
public ChartProvider getDefaultChart() { public ChartProvider getDefaultChart() {
return ChartTypeManager.getInstance().getChartTypes(getPlotID())[0]; return ChartTypeManager.getInstance().getCharts(getPlotID())[0];
} }
@Override @Override

7
designer-chart/src/main/java/com/fr/van/chart/heatmap/designer/HeatMapIndependentVanChartInterface.java

@ -38,6 +38,13 @@ public class HeatMapIndependentVanChartInterface extends MapIndependentVanChartI
return Toolkit.i18nText("Fine-Design_Chart_New_HeatMap"); return Toolkit.i18nText("Fine-Design_Chart_New_HeatMap");
} }
@Override
public String[] getSubName() {
return new String[]{
Toolkit.i18nText("Fine-Design_Chart_New_HeatMap"),
};
}
@Override @Override
public String[] getDemoImagePath() { public String[] getDemoImagePath() {
return new String[]{ return new String[]{

Loading…
Cancel
Save