Browse Source

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

* commit '93e832c75974b92c2463a509ef9a12c5625bbe84':
  CHART-4248 数据面板
  漏斗图 单系列过滤面板
  CHART-4248 漏斗、多层饼图、词云数据面板
persist/11.0
Wim.Zhai 5 years ago
parent
commit
ff83efc3dd
  1. 2
      designer-chart/src/main/java/com/fr/design/chartx/component/AbstractMultiComponentPane.java
  2. 68
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/FunnelCellDataFieldsPane.java
  3. 70
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/FunnelDataSetFieldsPane.java
  4. 2
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiPieDataSetFieldsPane.java
  5. 15
      designer-chart/src/main/java/com/fr/van/chart/column/VanColumnChartTypeUI.java
  6. 14
      designer-chart/src/main/java/com/fr/van/chart/funnel/designer/FunnelIndependentVanChartInterface.java
  7. 24
      designer-chart/src/main/java/com/fr/van/chart/multilayer/MultiPieIndependentVanChartInterface.java
  8. 14
      designer-chart/src/main/java/com/fr/van/chart/vanchart/AbstractIndependentVanChartUI.java
  9. 14
      designer-chart/src/main/java/com/fr/van/chart/vanchart/AbstractMultiCategoryVanChartUI.java
  10. 23
      designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/WordCloudIndependentVanChartInterface.java

2
designer-chart/src/main/java/com/fr/design/chartx/component/AbstractMultiComponentPane.java

@ -126,7 +126,7 @@ public abstract class AbstractMultiComponentPane<T extends JComponent> extends J
}
private boolean canAdd() {
return categoryComponentList.size() < 3;
return categoryComponentList.size() < 2;
}
public List<T> componentList() {

68
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/FunnelCellDataFieldsPane.java

@ -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());
}
}

70
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/FunnelDataSetFieldsPane.java

@ -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());
}
}

2
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiPieDataSetFieldsPane.java

@ -77,6 +77,7 @@ public class MultiPieDataSetFieldsPane extends AbstractDataSetFieldsPane<MultiPi
@Override
public void populateBean(MultiPieColumnFieldCollection ob) {
nameField.setText(ob.getTargetName());
levelComboBoxPane.populate(ob.getLevels());
populateFunctionField(value, function, ob.getValue());
}
@ -84,6 +85,7 @@ public class MultiPieDataSetFieldsPane extends AbstractDataSetFieldsPane<MultiPi
@Override
public MultiPieColumnFieldCollection updateBean() {
MultiPieColumnFieldCollection result = new MultiPieColumnFieldCollection();
result.setTargetName(nameField.getName());
levelComboBoxPane.update(result.getLevels());

15
designer-chart/src/main/java/com/fr/van/chart/column/VanColumnChartTypeUI.java

@ -2,14 +2,8 @@ package com.fr.van.chart.column;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.chartx.AbstractVanSingleDataPane;
import com.fr.design.chartx.fields.diff.MultiCategoryCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.MultiCategoryDataSetFieldsPane;
import com.fr.design.chartx.single.SingleDataPane;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.van.chart.vanchart.AbstractMultiCategoryVanChartUI;
@ -66,13 +60,4 @@ public class VanColumnChartTypeUI extends AbstractMultiCategoryVanChartUI {
return new VanChartColumnSeriesPane(parent, plot);
}
@Override
public ChartDataPane getChartDataPane(AttributeChangeListener listener) {
return new AbstractVanSingleDataPane(listener) {
@Override
protected SingleDataPane createSingleDataPane() {
return new SingleDataPane(new MultiCategoryDataSetFieldsPane(), new MultiCategoryCellDataFieldsPane());
}
};
}
}

14
designer-chart/src/main/java/com/fr/van/chart/funnel/designer/FunnelIndependentVanChartInterface.java

@ -3,6 +3,10 @@ package com.fr.van.chart.funnel.designer;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.chartx.AbstractVanSingleDataPane;
import com.fr.design.chartx.fields.diff.FunnelCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.FunnelDataSetFieldsPane;
import com.fr.design.chartx.single.SingleDataPane;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.i18n.Toolkit;
@ -90,4 +94,14 @@ public class FunnelIndependentVanChartInterface extends AbstractIndependentVanCh
return "com/fr/design/images/form/toolbar/funnel.png";
}
@Override
public ChartDataPane getChartDataPane(AttributeChangeListener listener) {
return new AbstractVanSingleDataPane(listener) {
@Override
protected SingleDataPane createSingleDataPane() {
return new SingleDataPane(new FunnelDataSetFieldsPane(), new FunnelCellDataFieldsPane());
}
};
}
}

24
designer-chart/src/main/java/com/fr/van/chart/multilayer/MultiPieIndependentVanChartInterface.java

@ -2,8 +2,14 @@ package com.fr.van.chart.multilayer;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.chartx.AbstractVanSingleDataPane;
import com.fr.design.chartx.fields.diff.MultiPieCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.MultiPieDataSetFieldsPane;
import com.fr.design.chartx.single.SingleDataPane;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.van.chart.multilayer.other.VanChartMultiPieConditionPane;
@ -36,15 +42,15 @@ public class MultiPieIndependentVanChartInterface extends AbstractIndependentVan
};
}
// @Override
// public ChartDataPane getChartDataPane(AttributeChangeListener listener) {
// return new AbstractDataPane(listener) {
// @Override
// protected SingleDataPane createSingleDataPane() {
// return new SingleDataPane(new MultiPieDataSetFieldsPane(), new MultiPieCellDataFieldsPane());
// }
// };
// }
@Override
public ChartDataPane getChartDataPane(AttributeChangeListener listener) {
return new AbstractVanSingleDataPane(listener) {
@Override
protected SingleDataPane createSingleDataPane() {
return new SingleDataPane(new MultiPieDataSetFieldsPane(), new MultiPieCellDataFieldsPane());
}
};
}
public BasicBeanPane<Plot> getPlotSeriesPane(ChartStylePane parent, Plot plot){
return new VanChartMultiPieSeriesPane(parent, plot);

14
designer-chart/src/main/java/com/fr/van/chart/vanchart/AbstractIndependentVanChartUI.java

@ -2,6 +2,10 @@ package com.fr.van.chart.vanchart;
import com.fr.chart.chartattr.Plot;
import com.fr.design.chart.fun.impl.AbstractIndependentChartUIWithAPILevel;
import com.fr.design.chartx.AbstractVanSingleDataPane;
import com.fr.design.chartx.fields.diff.SingleCategoryCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.SingleCategoryDataSetFieldsPane;
import com.fr.design.chartx.single.SingleDataPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
@ -46,4 +50,14 @@ public abstract class AbstractIndependentVanChartUI extends AbstractIndependentC
public int currentAPILevel() {
return CURRENT_API_LEVEL;
}
@Override
public ChartDataPane getChartDataPane(AttributeChangeListener listener) {
return new AbstractVanSingleDataPane(listener) {
@Override
protected SingleDataPane createSingleDataPane() {
return new SingleDataPane(new SingleCategoryDataSetFieldsPane(), new SingleCategoryCellDataFieldsPane());
}
};
}
}

14
designer-chart/src/main/java/com/fr/van/chart/vanchart/AbstractMultiCategoryVanChartUI.java

@ -3,6 +3,10 @@ package com.fr.van.chart.vanchart;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.chartx.AbstractVanSingleDataPane;
import com.fr.design.chartx.fields.diff.MultiCategoryCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.MultiCategoryDataSetFieldsPane;
import com.fr.design.chartx.single.SingleDataPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
@ -60,4 +64,14 @@ public abstract class AbstractMultiCategoryVanChartUI extends AbstractIndependen
};
return new AbstractChartAttrPane[]{stylePane, otherPane};
}
@Override
public ChartDataPane getChartDataPane(AttributeChangeListener listener) {
return new AbstractVanSingleDataPane(listener) {
@Override
protected SingleDataPane createSingleDataPane() {
return new SingleDataPane(new MultiCategoryDataSetFieldsPane(), new MultiCategoryCellDataFieldsPane());
}
};
}
}

23
designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/WordCloudIndependentVanChartInterface.java

@ -3,11 +3,16 @@ package com.fr.van.chart.wordcloud.designer;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.chartx.AbstractVanSingleDataPane;
import com.fr.design.chartx.fields.diff.WordCloudCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.WordCloudDataSetFieldsPane;
import com.fr.design.chartx.single.SingleDataPane;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.van.chart.designer.other.VanChartInteractivePaneWithOutSort;
@ -93,13 +98,13 @@ public class WordCloudIndependentVanChartInterface extends AbstractIndependentVa
return new AbstractChartAttrPane[]{stylePane, otherPane};
}
// @Override
// public ChartDataPane getChartDataPane(AttributeChangeListener listener) {
// return new AbstractDataPane(listener) {
// @Override
// protected SingleDataPane createSingleDataPane() {
// return new SingleDataPane(new WordCloudDataSetFieldsPane(), new WordCloudCellDataFieldsPane());
// }
// };
// }
@Override
public ChartDataPane getChartDataPane(AttributeChangeListener listener) {
return new AbstractVanSingleDataPane(listener) {
@Override
protected SingleDataPane createSingleDataPane() {
return new SingleDataPane(new WordCloudDataSetFieldsPane(), new WordCloudCellDataFieldsPane());
}
};
}
}

Loading…
Cancel
Save