From e6186416bb5de1f655f3fa906591038e709c3663 Mon Sep 17 00:00:00 2001 From: "Wim.Zhai" Date: Fri, 25 Oct 2019 11:10:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BC=8F=E6=96=97=E5=9B=BE=20=E5=8D=95?= =?UTF-8?q?=E7=B3=BB=E5=88=97=E8=BF=87=E6=BB=A4=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fields/diff/FunnelCellDataFieldsPane.java | 25 ++++++++++++++----- .../fields/diff/FunnelDataSetFieldsPane.java | 25 ++++++++++++++----- 2 files changed, 38 insertions(+), 12 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/chartx/fields/diff/FunnelCellDataFieldsPane.java b/designer-chart/src/main/java/com/fr/design/chartx/fields/diff/FunnelCellDataFieldsPane.java index de56777440..98dc4226c9 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/fields/diff/FunnelCellDataFieldsPane.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/fields/diff/FunnelCellDataFieldsPane.java @@ -1,8 +1,11 @@ package com.fr.design.chartx.fields.diff; +import com.fr.chartx.data.field.SeriesValueCorrelationDefinition; import com.fr.chartx.data.field.diff.MultiCategoryColumnFieldCollection; -import com.fr.design.chartx.component.CategorySeriesFilterPane; +import com.fr.design.chartx.component.AbstractSingleFilterPane; import com.fr.design.formula.TinyFormulaPane; +import com.fr.design.i18n.Toolkit; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; import javax.swing.BorderFactory; import javax.swing.JPanel; @@ -13,11 +16,16 @@ import java.awt.BorderLayout; */ public class FunnelCellDataFieldsPane extends AbstractCellDataFieldsWithSeriesValuePane { - private CategorySeriesFilterPane filterPane; + private AbstractSingleFilterPane filterPane; @Override protected void initComponents() { - filterPane = new CategorySeriesFilterPane(); + filterPane = new AbstractSingleFilterPane() { + @Override + public String title4PopupWindow() { + return Toolkit.i18nText("Fine-Design_Chart_Series"); + } + }; JPanel northPane = new JPanel(new BorderLayout(0, 6)); northPane.add(createCenterPane(), BorderLayout.CENTER); @@ -25,7 +33,10 @@ public class FunnelCellDataFieldsPane extends AbstractCellDataFieldsWithSeriesVa this.setLayout(new BorderLayout(0, 6)); this.add(northPane, BorderLayout.NORTH); - this.add(filterPane, BorderLayout.CENTER); + JPanel contentPane = new JPanel(new BorderLayout()); + contentPane.add(new JPanel(), BorderLayout.NORTH); + contentPane.add(filterPane, BorderLayout.CENTER); + this.add(TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), contentPane), BorderLayout.CENTER); } @Override @@ -42,14 +53,16 @@ public class FunnelCellDataFieldsPane extends AbstractCellDataFieldsWithSeriesVa public MultiCategoryColumnFieldCollection updateBean() { MultiCategoryColumnFieldCollection fieldCollection = new MultiCategoryColumnFieldCollection(); updateSeriesValuePane(fieldCollection); - filterPane.updateMultiCategoryFieldCollection(fieldCollection); + SeriesValueCorrelationDefinition seriesValueCorrelationDefinition = fieldCollection.getSeriesValueCorrelationDefinition(); + filterPane.updateBean(seriesValueCorrelationDefinition.getFilterProperties()); return fieldCollection; } @Override public void populateBean(MultiCategoryColumnFieldCollection ob) { populateSeriesValuePane(ob); - filterPane.populateMultiCategoryFieldCollection(ob); + SeriesValueCorrelationDefinition seriesValueCorrelationDefinition = ob.getSeriesValueCorrelationDefinition(); + filterPane.populateBean(seriesValueCorrelationDefinition.getFilterProperties()); } } diff --git a/designer-chart/src/main/java/com/fr/design/chartx/fields/diff/FunnelDataSetFieldsPane.java b/designer-chart/src/main/java/com/fr/design/chartx/fields/diff/FunnelDataSetFieldsPane.java index 0f94683bfe..69c3af0196 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/fields/diff/FunnelDataSetFieldsPane.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/fields/diff/FunnelDataSetFieldsPane.java @@ -1,8 +1,11 @@ package com.fr.design.chartx.fields.diff; +import com.fr.chartx.data.field.SeriesValueCorrelationDefinition; import com.fr.chartx.data.field.diff.MultiCategoryColumnFieldCollection; -import com.fr.design.chartx.component.CategorySeriesFilterPane; +import com.fr.design.chartx.component.AbstractSingleFilterPane; import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.i18n.Toolkit; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; import javax.swing.BorderFactory; import javax.swing.JPanel; @@ -15,11 +18,16 @@ import java.awt.BorderLayout; public class FunnelDataSetFieldsPane extends AbstractDataSetFieldsWithSeriesValuePane { - private CategorySeriesFilterPane filterPane; + private AbstractSingleFilterPane filterPane; @Override protected void initComponents() { - filterPane = new CategorySeriesFilterPane(); + filterPane = new AbstractSingleFilterPane() { + @Override + public String title4PopupWindow() { + return Toolkit.i18nText("Fine-Design_Chart_Series"); + } + }; JPanel northPane = new JPanel(new BorderLayout(0, 6)); northPane.add(new JSeparator(), BorderLayout.CENTER); @@ -28,7 +36,10 @@ public class FunnelDataSetFieldsPane extends AbstractDataSetFieldsWithSeriesValu this.setLayout(new BorderLayout(0, 6)); this.add(northPane, BorderLayout.NORTH); - this.add(filterPane, BorderLayout.CENTER); + JPanel contentPane = new JPanel(new BorderLayout()); + contentPane.add(new JPanel(), BorderLayout.NORTH); + contentPane.add(filterPane, BorderLayout.CENTER); + this.add(TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), contentPane), BorderLayout.CENTER); } @Override @@ -45,13 +56,15 @@ public class FunnelDataSetFieldsPane extends AbstractDataSetFieldsWithSeriesValu public MultiCategoryColumnFieldCollection updateBean() { MultiCategoryColumnFieldCollection collection = new MultiCategoryColumnFieldCollection(); updateSeriesValuePane(collection); - filterPane.updateMultiCategoryFieldCollection(collection); + SeriesValueCorrelationDefinition seriesValueCorrelationDefinition = collection.getSeriesValueCorrelationDefinition(); + filterPane.updateBean(seriesValueCorrelationDefinition.getFilterProperties()); return collection; } @Override public void populateBean(MultiCategoryColumnFieldCollection ob) { populateSeriesValuePane(ob); - filterPane.populateMultiCategoryFieldCollection(ob); + SeriesValueCorrelationDefinition seriesValueCorrelationDefinition = ob.getSeriesValueCorrelationDefinition(); + filterPane.populateBean(seriesValueCorrelationDefinition.getFilterProperties()); } }