Browse Source

REPORT-70426 条件属性支持汇总数组-交互界面问题

release/11.0
pengda 3 years ago
parent
commit
0da69cc600
  1. 10
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/ColSelectedWithSummaryMethodEditor.java

10
designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/ColSelectedWithSummaryMethodEditor.java

@ -2,6 +2,7 @@ package com.fr.design.chart.series.SeriesCondition;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.data.DSColumnWithSummaryMethod; import com.fr.data.DSColumnWithSummaryMethod;
import com.fr.data.util.function.AbstractDataFunction;
import com.fr.design.chart.ChartDataHelper; import com.fr.design.chart.ChartDataHelper;
import com.fr.design.data.datapane.SummaryMethodComboBox; import com.fr.design.data.datapane.SummaryMethodComboBox;
import com.fr.design.editor.editor.Editor; import com.fr.design.editor.editor.Editor;
@ -25,12 +26,15 @@ public class ColSelectedWithSummaryMethodEditor extends Editor<DSColumnWithSumma
columnNameComboBox = new UIComboBox(); columnNameComboBox = new UIComboBox();
} }
columnNameComboBox.setPreferredSize(new Dimension(82, 20)); columnNameComboBox.setPreferredSize(new Dimension(82, 20));
this.add(columnNameComboBox);
summaryMethodComboBox = new SummaryMethodComboBox(); summaryMethodComboBox = new SummaryMethodComboBox();
summaryMethodComboBox.setModel(summaryMethodComboBoxModel); summaryMethodComboBox.setModel(summaryMethodComboBoxModel);
summaryMethodComboBox.setPreferredSize(new Dimension(82, 20)); summaryMethodComboBox.setPreferredSize(new Dimension(82, 20));
this.setLayout(FRGUIPaneFactory.createLeftZeroVgapNormalHgapLayout());
this.add(columnNameComboBox);
this.add(summaryMethodComboBox); this.add(summaryMethodComboBox);
columnNameComboBox.setModel(columnNameComboBoxModel); columnNameComboBox.setModel(columnNameComboBoxModel);
columnNameComboBox.setSelectedItem(null);
summaryMethodComboBox.setSelectedItem(null);
} }
public static void refreshCommonChartFieldNames(Chart chart) { public static void refreshCommonChartFieldNames(Chart chart) {
@ -52,6 +56,8 @@ public class ColSelectedWithSummaryMethodEditor extends Editor<DSColumnWithSumma
for (String method : SummaryMethodComboBox.CALCULATE_ARRAY) { for (String method : SummaryMethodComboBox.CALCULATE_ARRAY) {
summaryMethodComboBoxModel.addElement(method); summaryMethodComboBoxModel.addElement(method);
} }
columnNameComboBoxModel.setSelectedItem(null);
summaryMethodComboBoxModel.setSelectedItem(null);
} else { } else {
columnNameComboBoxModel.removeAllElements(); columnNameComboBoxModel.removeAllElements();
summaryMethodComboBoxModel.removeAllElements(); summaryMethodComboBoxModel.removeAllElements();
@ -77,7 +83,7 @@ public class ColSelectedWithSummaryMethodEditor extends Editor<DSColumnWithSumma
public void setValue(DSColumnWithSummaryMethod value) { public void setValue(DSColumnWithSummaryMethod value) {
if (value != null) { if (value != null) {
columnNameComboBox.setSelectedItem(value.getFieldName()); columnNameComboBox.setSelectedItem(value.getFieldName());
summaryMethodComboBox.setSelectedItem(value.getDataFunction()); summaryMethodComboBox.populateBean((AbstractDataFunction)value.getDataFunction());
} }
} }

Loading…
Cancel
Save