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