Browse Source

CHART-4248 数据面板

research/11.0
Wim.Zhai 5 years ago
parent
commit
93e832c759
  1. 2
      designer-chart/src/main/java/com/fr/design/chartx/component/AbstractMultiComponentPane.java
  2. 10
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/FunnelCellDataFieldsPane.java
  3. 10
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/FunnelDataSetFieldsPane.java
  4. 6
      designer-chart/src/main/java/com/fr/design/chartx/impl/AbstractDataPane.java
  5. 15
      designer-chart/src/main/java/com/fr/van/chart/column/VanColumnChartTypeUI.java
  6. 4
      designer-chart/src/main/java/com/fr/van/chart/multilayer/MultiPieIndependentVanChartInterface.java
  7. 14
      designer-chart/src/main/java/com/fr/van/chart/vanchart/AbstractIndependentVanChartUI.java
  8. 14
      designer-chart/src/main/java/com/fr/van/chart/vanchart/AbstractMultiCategoryVanChartUI.java
  9. 4
      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() { private boolean canAdd() {
return categoryComponentList.size() < 3; return categoryComponentList.size() < 2;
} }
public List<T> componentList() { public List<T> componentList() {

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

@ -1,7 +1,7 @@
package com.fr.design.chartx.fields.diff; package com.fr.design.chartx.fields.diff;
import com.fr.chartx.data.field.SeriesValueCorrelationDefinition; import com.fr.chartx.data.field.SeriesValueCorrelationDefinition;
import com.fr.chartx.data.field.diff.MultiCategoryColumnFieldCollection; import com.fr.chartx.data.field.diff.AbstractColumnFieldCollectionWithSeriesValue;
import com.fr.design.chartx.component.AbstractSingleFilterPane; import com.fr.design.chartx.component.AbstractSingleFilterPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
@ -14,7 +14,7 @@ import java.awt.BorderLayout;
/** /**
* Created by Wim on 2019/10/23. * Created by Wim on 2019/10/23.
*/ */
public class FunnelCellDataFieldsPane extends AbstractCellDataFieldsWithSeriesValuePane<MultiCategoryColumnFieldCollection> { public class FunnelCellDataFieldsPane extends AbstractCellDataFieldsWithSeriesValuePane<AbstractColumnFieldCollectionWithSeriesValue> {
private AbstractSingleFilterPane filterPane; private AbstractSingleFilterPane filterPane;
@ -50,8 +50,8 @@ public class FunnelCellDataFieldsPane extends AbstractCellDataFieldsWithSeriesVa
} }
@Override @Override
public MultiCategoryColumnFieldCollection updateBean() { public AbstractColumnFieldCollectionWithSeriesValue updateBean() {
MultiCategoryColumnFieldCollection fieldCollection = new MultiCategoryColumnFieldCollection(); AbstractColumnFieldCollectionWithSeriesValue fieldCollection = new AbstractColumnFieldCollectionWithSeriesValue();
updateSeriesValuePane(fieldCollection); updateSeriesValuePane(fieldCollection);
SeriesValueCorrelationDefinition seriesValueCorrelationDefinition = fieldCollection.getSeriesValueCorrelationDefinition(); SeriesValueCorrelationDefinition seriesValueCorrelationDefinition = fieldCollection.getSeriesValueCorrelationDefinition();
filterPane.updateBean(seriesValueCorrelationDefinition.getFilterProperties()); filterPane.updateBean(seriesValueCorrelationDefinition.getFilterProperties());
@ -59,7 +59,7 @@ public class FunnelCellDataFieldsPane extends AbstractCellDataFieldsWithSeriesVa
} }
@Override @Override
public void populateBean(MultiCategoryColumnFieldCollection ob) { public void populateBean(AbstractColumnFieldCollectionWithSeriesValue ob) {
populateSeriesValuePane(ob); populateSeriesValuePane(ob);
SeriesValueCorrelationDefinition seriesValueCorrelationDefinition = ob.getSeriesValueCorrelationDefinition(); SeriesValueCorrelationDefinition seriesValueCorrelationDefinition = ob.getSeriesValueCorrelationDefinition();
filterPane.populateBean(seriesValueCorrelationDefinition.getFilterProperties()); filterPane.populateBean(seriesValueCorrelationDefinition.getFilterProperties());

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

@ -1,7 +1,7 @@
package com.fr.design.chartx.fields.diff; package com.fr.design.chartx.fields.diff;
import com.fr.chartx.data.field.SeriesValueCorrelationDefinition; import com.fr.chartx.data.field.SeriesValueCorrelationDefinition;
import com.fr.chartx.data.field.diff.MultiCategoryColumnFieldCollection; import com.fr.chartx.data.field.diff.AbstractColumnFieldCollectionWithSeriesValue;
import com.fr.design.chartx.component.AbstractSingleFilterPane; import com.fr.design.chartx.component.AbstractSingleFilterPane;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
@ -15,7 +15,7 @@ import java.awt.BorderLayout;
/** /**
* Created by Wim on 2019/10/23. * Created by Wim on 2019/10/23.
*/ */
public class FunnelDataSetFieldsPane extends AbstractDataSetFieldsWithSeriesValuePane<MultiCategoryColumnFieldCollection> { public class FunnelDataSetFieldsPane extends AbstractDataSetFieldsWithSeriesValuePane<AbstractColumnFieldCollectionWithSeriesValue> {
private AbstractSingleFilterPane filterPane; private AbstractSingleFilterPane filterPane;
@ -53,8 +53,8 @@ public class FunnelDataSetFieldsPane extends AbstractDataSetFieldsWithSeriesValu
} }
@Override @Override
public MultiCategoryColumnFieldCollection updateBean() { public AbstractColumnFieldCollectionWithSeriesValue updateBean() {
MultiCategoryColumnFieldCollection collection = new MultiCategoryColumnFieldCollection(); AbstractColumnFieldCollectionWithSeriesValue collection = new AbstractColumnFieldCollectionWithSeriesValue();
updateSeriesValuePane(collection); updateSeriesValuePane(collection);
SeriesValueCorrelationDefinition seriesValueCorrelationDefinition = collection.getSeriesValueCorrelationDefinition(); SeriesValueCorrelationDefinition seriesValueCorrelationDefinition = collection.getSeriesValueCorrelationDefinition();
filterPane.updateBean(seriesValueCorrelationDefinition.getFilterProperties()); filterPane.updateBean(seriesValueCorrelationDefinition.getFilterProperties());
@ -62,7 +62,7 @@ public class FunnelDataSetFieldsPane extends AbstractDataSetFieldsWithSeriesValu
} }
@Override @Override
public void populateBean(MultiCategoryColumnFieldCollection ob) { public void populateBean(AbstractColumnFieldCollectionWithSeriesValue ob) {
populateSeriesValuePane(ob); populateSeriesValuePane(ob);
SeriesValueCorrelationDefinition seriesValueCorrelationDefinition = ob.getSeriesValueCorrelationDefinition(); SeriesValueCorrelationDefinition seriesValueCorrelationDefinition = ob.getSeriesValueCorrelationDefinition();
filterPane.populateBean(seriesValueCorrelationDefinition.getFilterProperties()); filterPane.populateBean(seriesValueCorrelationDefinition.getFilterProperties());

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

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

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.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane; 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.condition.ConditionAttributesPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.i18n.Toolkit; 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.ChartStylePane;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.van.chart.vanchart.AbstractMultiCategoryVanChartUI; import com.fr.van.chart.vanchart.AbstractMultiCategoryVanChartUI;
@ -66,13 +60,4 @@ public class VanColumnChartTypeUI extends AbstractMultiCategoryVanChartUI {
return new VanChartColumnSeriesPane(parent, plot); 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());
}
};
}
} }

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

@ -2,9 +2,9 @@ package com.fr.van.chart.multilayer;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane; 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.MultiPieCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.MultiPieDataSetFieldsPane; 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.chartx.single.SingleDataPane;
import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.AttributeChangeListener;
@ -44,7 +44,7 @@ public class MultiPieIndependentVanChartInterface extends AbstractIndependentVan
@Override @Override
public ChartDataPane getChartDataPane(AttributeChangeListener listener) { public ChartDataPane getChartDataPane(AttributeChangeListener listener) {
return new AbstractDataPane(listener) { return new AbstractVanSingleDataPane(listener) {
@Override @Override
protected SingleDataPane createSingleDataPane() { protected SingleDataPane createSingleDataPane() {
return new SingleDataPane(new MultiPieDataSetFieldsPane(), new MultiPieCellDataFieldsPane()); return new SingleDataPane(new MultiPieDataSetFieldsPane(), new MultiPieCellDataFieldsPane());

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.chart.chartattr.Plot;
import com.fr.design.chart.fun.impl.AbstractIndependentChartUIWithAPILevel; 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.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.AbstractChartAttrPane; import com.fr.design.mainframe.chart.AbstractChartAttrPane;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
@ -46,4 +50,14 @@ public abstract class AbstractIndependentVanChartUI extends AbstractIndependentC
public int currentAPILevel() { public int currentAPILevel() {
return CURRENT_API_LEVEL; 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.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane; 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.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.AbstractChartAttrPane; import com.fr.design.mainframe.chart.AbstractChartAttrPane;
import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartDataPane;
@ -60,4 +64,14 @@ public abstract class AbstractMultiCategoryVanChartUI extends AbstractIndependen
}; };
return new AbstractChartAttrPane[]{stylePane, otherPane}; 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());
}
};
}
} }

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

@ -3,9 +3,9 @@ package com.fr.van.chart.wordcloud.designer;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane; 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.WordCloudCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.WordCloudDataSetFieldsPane; 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.chartx.single.SingleDataPane;
import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
@ -100,7 +100,7 @@ public class WordCloudIndependentVanChartInterface extends AbstractIndependentVa
@Override @Override
public ChartDataPane getChartDataPane(AttributeChangeListener listener) { public ChartDataPane getChartDataPane(AttributeChangeListener listener) {
return new AbstractDataPane(listener) { return new AbstractVanSingleDataPane(listener) {
@Override @Override
protected SingleDataPane createSingleDataPane() { protected SingleDataPane createSingleDataPane() {
return new SingleDataPane(new WordCloudDataSetFieldsPane(), new WordCloudCellDataFieldsPane()); return new SingleDataPane(new WordCloudDataSetFieldsPane(), new WordCloudCellDataFieldsPane());

Loading…
Cancel
Save