Browse Source

CHART-4248 漏斗、多层饼图、词云数据面板

persist/11.0
Wim.Zhai 5 years ago
parent
commit
d9c42530db
  1. 55
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/FunnelCellDataFieldsPane.java
  2. 57
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/FunnelDataSetFieldsPane.java
  3. 2
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiPieDataSetFieldsPane.java
  4. 6
      designer-chart/src/main/java/com/fr/design/chartx/impl/AbstractDataPane.java
  5. 14
      designer-chart/src/main/java/com/fr/van/chart/funnel/designer/FunnelIndependentVanChartInterface.java
  6. 24
      designer-chart/src/main/java/com/fr/van/chart/multilayer/MultiPieIndependentVanChartInterface.java
  7. 23
      designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/WordCloudIndependentVanChartInterface.java

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

@ -0,0 +1,55 @@
package com.fr.design.chartx.fields.diff;
import com.fr.chartx.data.field.diff.MultiCategoryColumnFieldCollection;
import com.fr.design.chartx.component.CategorySeriesFilterPane;
import com.fr.design.formula.TinyFormulaPane;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
/**
* Created by Wim on 2019/10/23.
*/
public class FunnelCellDataFieldsPane extends AbstractCellDataFieldsWithSeriesValuePane<MultiCategoryColumnFieldCollection> {
private CategorySeriesFilterPane filterPane;
@Override
protected void initComponents() {
filterPane = new CategorySeriesFilterPane();
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);
this.add(filterPane, BorderLayout.CENTER);
}
@Override
protected String[] fieldLabels() {
return new String[0];
}
@Override
protected TinyFormulaPane[] formulaPanes() {
return new TinyFormulaPane[0];
}
@Override
public MultiCategoryColumnFieldCollection updateBean() {
MultiCategoryColumnFieldCollection fieldCollection = new MultiCategoryColumnFieldCollection();
updateSeriesValuePane(fieldCollection);
filterPane.updateMultiCategoryFieldCollection(fieldCollection);
return fieldCollection;
}
@Override
public void populateBean(MultiCategoryColumnFieldCollection ob) {
populateSeriesValuePane(ob);
filterPane.populateMultiCategoryFieldCollection(ob);
}
}

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

@ -0,0 +1,57 @@
package com.fr.design.chartx.fields.diff;
import com.fr.chartx.data.field.diff.MultiCategoryColumnFieldCollection;
import com.fr.design.chartx.component.CategorySeriesFilterPane;
import com.fr.design.gui.icombobox.UIComboBox;
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<MultiCategoryColumnFieldCollection> {
private CategorySeriesFilterPane filterPane;
@Override
protected void initComponents() {
filterPane = new CategorySeriesFilterPane();
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);
this.add(filterPane, BorderLayout.CENTER);
}
@Override
protected String[] fieldLabels() {
return new String[0];
}
@Override
protected UIComboBox[] filedComboBoxes() {
return new UIComboBox[0];
}
@Override
public MultiCategoryColumnFieldCollection updateBean() {
MultiCategoryColumnFieldCollection collection = new MultiCategoryColumnFieldCollection();
updateSeriesValuePane(collection);
filterPane.updateMultiCategoryFieldCollection(collection);
return collection;
}
@Override
public void populateBean(MultiCategoryColumnFieldCollection ob) {
populateSeriesValuePane(ob);
filterPane.populateMultiCategoryFieldCollection(ob);
}
}

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

6
designer-chart/src/main/java/com/fr/design/chartx/impl/AbstractDataPane.java

@ -1,12 +1,12 @@
package com.fr.design.chartx.impl;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.impl.AbstractChartWithData;
import com.fr.chartx.data.AbstractDataDefinition;
import com.fr.chartx.data.ChartDataDefinitionProvider;
import com.fr.design.chartx.single.SingleDataPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.plugin.chart.vanchart.VanChart;
import javax.swing.JPanel;
import java.awt.BorderLayout;
@ -35,7 +35,7 @@ public abstract class AbstractDataPane extends ChartDataPane {
if (collection == null) {
return;
}
AbstractChartWithData chart = collection.getSelectedChart(AbstractChartWithData.class);
VanChart chart = collection.getSelectedChart(VanChart.class);
if (chart == null) {
return;
}
@ -57,7 +57,7 @@ public abstract class AbstractDataPane extends ChartDataPane {
if (collection == null) {
return;
}
AbstractChartWithData chart = collection.getSelectedChart(AbstractChartWithData.class);
VanChart chart = collection.getSelectedChart(VanChart.class);
if (chart == null) {
return;
}

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.fields.diff.MultiPieCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.MultiPieDataSetFieldsPane;
import com.fr.design.chartx.impl.AbstractDataPane;
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 AbstractDataPane(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);

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.fields.diff.WordCloudCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.WordCloudDataSetFieldsPane;
import com.fr.design.chartx.impl.AbstractDataPane;
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 AbstractDataPane(listener) {
@Override
protected SingleDataPane createSingleDataPane() {
return new SingleDataPane(new WordCloudDataSetFieldsPane(), new WordCloudCellDataFieldsPane());
}
};
}
}

Loading…
Cancel
Save