forked from fanruan/design
Browse Source
* commit '93e832c75974b92c2463a509ef9a12c5625bbe84': CHART-4248 数据面板 漏斗图 单系列过滤面板 CHART-4248 漏斗、多层饼图、词云数据面板persist/11.0
Wim.Zhai
5 years ago
10 changed files with 212 additions and 34 deletions
@ -0,0 +1,68 @@
|
||||
package com.fr.design.chartx.fields.diff; |
||||
|
||||
import com.fr.chartx.data.field.SeriesValueCorrelationDefinition; |
||||
import com.fr.chartx.data.field.diff.AbstractColumnFieldCollectionWithSeriesValue; |
||||
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; |
||||
import java.awt.BorderLayout; |
||||
|
||||
/** |
||||
* Created by Wim on 2019/10/23. |
||||
*/ |
||||
public class FunnelCellDataFieldsPane extends AbstractCellDataFieldsWithSeriesValuePane<AbstractColumnFieldCollectionWithSeriesValue> { |
||||
|
||||
private AbstractSingleFilterPane filterPane; |
||||
|
||||
@Override |
||||
protected void initComponents() { |
||||
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); |
||||
northPane.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 8)); |
||||
|
||||
this.setLayout(new BorderLayout(0, 6)); |
||||
this.add(northPane, BorderLayout.NORTH); |
||||
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 |
||||
protected String[] fieldLabels() { |
||||
return new String[0]; |
||||
} |
||||
|
||||
@Override |
||||
protected TinyFormulaPane[] formulaPanes() { |
||||
return new TinyFormulaPane[0]; |
||||
} |
||||
|
||||
@Override |
||||
public AbstractColumnFieldCollectionWithSeriesValue updateBean() { |
||||
AbstractColumnFieldCollectionWithSeriesValue fieldCollection = new AbstractColumnFieldCollectionWithSeriesValue(); |
||||
updateSeriesValuePane(fieldCollection); |
||||
SeriesValueCorrelationDefinition seriesValueCorrelationDefinition = fieldCollection.getSeriesValueCorrelationDefinition(); |
||||
filterPane.updateBean(seriesValueCorrelationDefinition.getFilterProperties()); |
||||
return fieldCollection; |
||||
} |
||||
|
||||
@Override |
||||
public void populateBean(AbstractColumnFieldCollectionWithSeriesValue ob) { |
||||
populateSeriesValuePane(ob); |
||||
SeriesValueCorrelationDefinition seriesValueCorrelationDefinition = ob.getSeriesValueCorrelationDefinition(); |
||||
filterPane.populateBean(seriesValueCorrelationDefinition.getFilterProperties()); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,70 @@
|
||||
package com.fr.design.chartx.fields.diff; |
||||
|
||||
import com.fr.chartx.data.field.SeriesValueCorrelationDefinition; |
||||
import com.fr.chartx.data.field.diff.AbstractColumnFieldCollectionWithSeriesValue; |
||||
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; |
||||
import javax.swing.JSeparator; |
||||
import java.awt.BorderLayout; |
||||
|
||||
/** |
||||
* Created by Wim on 2019/10/23. |
||||
*/ |
||||
public class FunnelDataSetFieldsPane extends AbstractDataSetFieldsWithSeriesValuePane<AbstractColumnFieldCollectionWithSeriesValue> { |
||||
|
||||
|
||||
private AbstractSingleFilterPane filterPane; |
||||
|
||||
@Override |
||||
protected void initComponents() { |
||||
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); |
||||
northPane.add(createCenterPane(), BorderLayout.SOUTH); |
||||
northPane.setBorder(BorderFactory.createEmptyBorder(4, 24, 0, 15)); |
||||
|
||||
this.setLayout(new BorderLayout(0, 6)); |
||||
this.add(northPane, BorderLayout.NORTH); |
||||
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 |
||||
protected String[] fieldLabels() { |
||||
return new String[0]; |
||||
} |
||||
|
||||
@Override |
||||
protected UIComboBox[] filedComboBoxes() { |
||||
return new UIComboBox[0]; |
||||
} |
||||
|
||||
@Override |
||||
public AbstractColumnFieldCollectionWithSeriesValue updateBean() { |
||||
AbstractColumnFieldCollectionWithSeriesValue collection = new AbstractColumnFieldCollectionWithSeriesValue(); |
||||
updateSeriesValuePane(collection); |
||||
SeriesValueCorrelationDefinition seriesValueCorrelationDefinition = collection.getSeriesValueCorrelationDefinition(); |
||||
filterPane.updateBean(seriesValueCorrelationDefinition.getFilterProperties()); |
||||
return collection; |
||||
} |
||||
|
||||
@Override |
||||
public void populateBean(AbstractColumnFieldCollectionWithSeriesValue ob) { |
||||
populateSeriesValuePane(ob); |
||||
SeriesValueCorrelationDefinition seriesValueCorrelationDefinition = ob.getSeriesValueCorrelationDefinition(); |
||||
filterPane.populateBean(seriesValueCorrelationDefinition.getFilterProperties()); |
||||
} |
||||
} |
Loading…
Reference in new issue