Browse Source

Merge pull request #1292 in DESIGN/design from ~WIM.ZHAI/xdesign:feature/10.0 to feature/10.0

* commit '796e7be795ed89911b00ef8fe3a9afaaa90202b8':
  CHART-11093 不实例化,类型不同就不populate 验证了没问题
  CHART-11093 反射获取相应数据面板对应的数据类型
  CHART-11321 fix 坐标轴显示策略面板checkUse
  CHART-11093 refactor 数据面板切换
  CHART-11093 按特定数据类型切换数据面板
research/11.0
Wim.Zhai 5 years ago
parent
commit
d60148b07e
  1. 5
      designer-chart/src/main/java/com/fr/design/chartx/CustomChartDataPane.java
  2. 9
      designer-chart/src/main/java/com/fr/design/chartx/single/CellDataPane.java
  3. 8
      designer-chart/src/main/java/com/fr/design/chartx/single/DataSetPane.java
  4. 1
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java

5
designer-chart/src/main/java/com/fr/design/chartx/CustomChartDataPane.java

@ -3,6 +3,8 @@ package com.fr.design.chartx;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chartx.data.AbstractDataDefinition;
import com.fr.chartx.data.CustomChartDataDefinition;
import com.fr.design.chartx.fields.diff.GaugeCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.GaugeDataSetFieldsPane;
import com.fr.design.chartx.fields.diff.MultiCategoryCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.MultiCategoryDataSetFieldsPane;
import com.fr.design.chartx.fields.diff.ScatterCellDataFieldsPane;
@ -86,8 +88,7 @@ public class CustomChartDataPane extends ChartDataPane {
case RING:
case SLOT:
case CUVETTE:
//todo 仪表板没写好
return new SingleDataPane(new SingleCategoryDataSetFieldsPane(), new SingleCategoryCellDataFieldsPane());
return new SingleDataPane(new GaugeDataSetFieldsPane(), new GaugeCellDataFieldsPane());
case SCATTER:
case BUBBLE:
return new SingleDataPane(new ScatterDataSetFieldsPane(), new ScatterCellDataFieldsPane());

9
designer-chart/src/main/java/com/fr/design/chartx/single/CellDataPane.java

@ -4,8 +4,11 @@ import com.fr.chartx.data.CellDataDefinition;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.chartx.fields.AbstractCellDataFieldsPane;
import com.fr.design.i18n.Toolkit;
import com.fr.stable.AssistUtils;
import java.awt.BorderLayout;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
/**
* Created by shine on 2019/5/21.
@ -43,7 +46,11 @@ public class CellDataPane extends FurtherBasicBeanPane<CellDataDefinition> {
@Override
public void populateBean(CellDataDefinition ob) {
cellDataFieldsPane.populateBean(ob.getColumnFieldCollection());
Type dataType = ((ParameterizedType) cellDataFieldsPane.getClass().getGenericSuperclass()).getActualTypeArguments()[0];
if (AssistUtils.equals(ob.getColumnFieldCollection().getClass(), dataType)) {
cellDataFieldsPane.populateBean(ob.getColumnFieldCollection());
}
}
@Override

8
designer-chart/src/main/java/com/fr/design/chartx/single/DataSetPane.java

@ -11,9 +11,12 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.DatabaseTableDataPane;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.stable.AssistUtils;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.List;
/**
@ -101,8 +104,11 @@ public class DataSetPane extends FurtherBasicBeanPane<DataSetDefinition> {
checkBoxUse();
tableDataPane.populateBean(ob.getNameTableData());
Type dataType = ((ParameterizedType) dataSetFieldsPane.getClass().getGenericSuperclass()).getActualTypeArguments()[0];
if (AssistUtils.equals(ob.getColumnFieldCollection().getClass(), dataType)) {
dataSetFieldsPane.populateBean(ob.getColumnFieldCollection());
}
dataSetFieldsPane.populateBean(ob.getColumnFieldCollection());
}
@Override

1
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java

@ -385,6 +385,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
protected void checkAllUse() {
checkCardPane();
checkLabelPane();
limitPane.checkMaxProPortionUse();
}
protected void checkCardPane() {

Loading…
Cancel
Save