Browse Source

CHART-4027 数据筛选界面整理

persist/11.0
shine 5 years ago
parent
commit
b8c636268f
  1. 32
      designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java
  2. 11
      designer-chart/src/main/java/com/fr/design/chartx/component/AbstractMultiComponentPane.java
  3. 33
      designer-chart/src/main/java/com/fr/design/chartx/component/AbstractSingleFilterPane.java
  4. 98
      designer-chart/src/main/java/com/fr/design/chartx/component/CategorySeriesFilterPane.java
  5. 6
      designer-chart/src/main/java/com/fr/design/chartx/component/MultiTinyFormulaPane.java
  6. 76
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiCategoryCellDataFieldsPane.java
  7. 81
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiCategoryDataSetFieldsPane.java
  8. 2
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/StructureCellDataFieldsPane.java
  9. 2
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/StructureDataSetFieldsPane.java
  10. 26
      designer-chart/src/main/java/com/fr/van/chart/column/VanColumnChartTypeUI.java
  11. 17
      designer-chart/src/main/java/com/fr/van/chart/structure/desinger/VanStructureChartTypeUI.java

32
designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java

@ -11,6 +11,18 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.chart.fun.ChartTypeUIProvider;
import com.fr.design.chart.gui.ChartWidgetOption;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.core.WidgetOption;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
import com.fr.design.mainframe.chart.ChartEditPane;
import com.fr.design.mainframe.chart.ChartsConfigPane;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.design.module.DesignModuleFactory;
import com.fr.design.type.ui.AreaChartTypeUI;
import com.fr.design.type.ui.BarChartTypeUI;
import com.fr.design.type.ui.BubbleChartTypeUI;
@ -28,18 +40,6 @@ import com.fr.design.type.ui.RadarChartTypeUI;
import com.fr.design.type.ui.RangeChartTypeUI;
import com.fr.design.type.ui.StockChartTypeUI;
import com.fr.design.type.ui.XYScatterChartTypeUI;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.core.WidgetOption;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
import com.fr.design.mainframe.chart.ChartEditPane;
import com.fr.design.mainframe.chart.ChartsConfigPane;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.design.module.DesignModuleFactory;
import com.fr.extended.chart.AbstractChart;
import com.fr.form.ui.ChartEditor;
import com.fr.general.GeneralContext;
@ -80,7 +80,7 @@ import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider;
import com.fr.van.chart.area.AreaIndependentVanChartInterface;
import com.fr.van.chart.bar.BarIndependentVanChartInterface;
import com.fr.van.chart.bubble.BubbleIndependentVanChartInterface;
import com.fr.van.chart.column.ColumnIndependentVanChartInterface;
import com.fr.van.chart.column.VanColumnChartTypeUI;
import com.fr.van.chart.custom.CustomIndependentVanChartInterface;
import com.fr.van.chart.drillmap.DrillMapIndependentVanChartInterface;
import com.fr.van.chart.funnel.designer.FunnelIndependentVanChartInterface;
@ -93,7 +93,7 @@ import com.fr.van.chart.multilayer.MultiPieIndependentVanChartInterface;
import com.fr.van.chart.pie.PieIndependentVanChartInterface;
import com.fr.van.chart.radar.RadarIndependentVanChartInterface;
import com.fr.van.chart.scatter.ScatterIndependentVanChartInterface;
import com.fr.van.chart.structure.desinger.StructureIndependentVanChartInterface;
import com.fr.van.chart.structure.desinger.VanStructureChartTypeUI;
import com.fr.van.chart.treemap.TreeMapIndependentVanChartInterface;
import com.fr.van.chart.wordcloud.designer.WordCloudIndependentVanChartInterface;
@ -182,7 +182,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
private static void readVanChart() {
addChartTypeInterface(VAN_CHART_PRIORITY, PiePlot4VanChart.VAN_CHART_PIE_PLOT, new PieIndependentVanChartInterface());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartColumnPlot.VAN_CHART_COLUMN_PLOT_ID, new ColumnIndependentVanChartInterface());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartColumnPlot.VAN_CHART_COLUMN_PLOT_ID, new VanColumnChartTypeUI());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartColumnPlot.VAN_CHART_BAR_PLOT_ID, new BarIndependentVanChartInterface());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartLinePlot.VAN_CHART_LINE_PLOT, new LineIndependentVanChartInterface());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartAreaPlot.VAN_CHART_AREA_PLOT_ID, new AreaIndependentVanChartInterface());
@ -199,7 +199,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartHeatMapPlot.VAN_CHART_HEAT_MAP_ID, new HeatMapIndependentVanChartInterface());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartWordCloudPlot.WORD_CLOUD_PLOT_ID, new WordCloudIndependentVanChartInterface());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartGanttPlot.VAN_CHART_GANTT_PLOT_ID, new GanttIndependentVanChartInterface());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartStructurePlot.STRUCTURE_PLOT_ID, new StructureIndependentVanChartInterface());
addChartTypeInterface(VAN_CHART_PRIORITY, VanChartStructurePlot.STRUCTURE_PLOT_ID, new VanStructureChartTypeUI());
}

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

@ -24,7 +24,6 @@ import java.util.List;
* 一列组件<T extends JComponent> 可增可删通过JComponent后面的加减button增删
*/
public abstract class AbstractMultiComponentPane<T extends JComponent> extends JPanel {
private static final int COM_W = 96;
private static final int H = 20;
private static final int ICON_W = 20;
@ -50,7 +49,7 @@ public abstract class AbstractMultiComponentPane<T extends JComponent> extends J
label.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH, ChartDataPane.LABEL_HEIGHT));
firstFieldComponent = createFirstFieldComponent();
firstFieldComponent.setPreferredSize(new Dimension(COM_W, H));
firstFieldComponent.setPreferredSize(new Dimension(componentWidth(), H));
addButton = new UIButton(IOUtils.readIcon("/com/fr/design/images/buttonicon/add.png"));
addButton.setPreferredSize(new Dimension(ICON_W, H));
@ -64,7 +63,7 @@ public abstract class AbstractMultiComponentPane<T extends JComponent> extends J
});
final JPanel panel = new JPanel();
panel.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 2));
panel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 2));
panel.add(label);
panel.add(firstFieldComponent);
@ -78,6 +77,10 @@ public abstract class AbstractMultiComponentPane<T extends JComponent> extends J
this.add(boxPane, BorderLayout.CENTER);
}
protected int componentWidth() {
return 96;
}
private JPanel addComboBoxAndButtonToBox(T uiComboBox, UIButton uiButton) {
final JPanel panel = new JPanel();
panel.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 2));
@ -93,7 +96,7 @@ public abstract class AbstractMultiComponentPane<T extends JComponent> extends J
private void addNewComboBox() {
final T comboBox = createOtherFieldComponent();
comboBox.setPreferredSize(new Dimension(COM_W, H));
comboBox.setPreferredSize(new Dimension(componentWidth(), H));
UIButton delButton = new UIButton(IOUtils.readIcon("com/fr/design/images/toolbarbtn/close.png"));
delButton.setPreferredSize(new Dimension(ICON_W, H));

33
designer-chart/src/main/java/com/fr/design/chartx/component/AbstractSingleFilterPane.java

@ -2,10 +2,12 @@ package com.fr.design.chartx.component;
import com.fr.base.Utils;
import com.fr.chartx.data.field.DataFilterProperties;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.mainframe.chart.gui.data.PresentComboBox;
import com.fr.design.mainframe.chart.gui.style.AbstractChartTabPane;
@ -22,7 +24,7 @@ import java.awt.Dimension;
/**
* Created by shine on 2019/07/18.
*/
public abstract class AbstractSingleFilterPane extends AbstractChartTabPane<DataFilterProperties> {
public abstract class AbstractSingleFilterPane extends AbstractChartTabPane<DataFilterProperties> implements UIObserver {
private static final int FIL_HEIGHT = 150;
@ -34,14 +36,12 @@ public abstract class AbstractSingleFilterPane extends AbstractChartTabPane<Data
private PresentComboBox present;
private AbstractAttrNoScrollPane parent;
private JPanel topPane;
private UIObserverListener listener;
public AbstractSingleFilterPane() {
super(true);
//todo@shinerefactor present的时候这边可以整理下
// this.parent = parent;
}
@Override
@ -72,13 +72,13 @@ public abstract class AbstractSingleFilterPane extends AbstractChartTabPane<Data
private JPanel initPane() {
useTopCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Only_Use_Before_Records"));
useTopCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Only_Use_Before_Records"));
JPanel panel1 = new JPanel(new BorderLayout());
JPanel panel2 = new JPanel(new BorderLayout());
panel1.add(useTopCheckBox, BorderLayout.NORTH);
topNumTextField = new UITextField();
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Records_Num"));
mergeOtherCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_CombineOther"));
UILabel label = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Records_Num"));
mergeOtherCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Data_CombineOther"));
mergeOtherCheckBox.setSelected(true);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
@ -94,7 +94,7 @@ public abstract class AbstractSingleFilterPane extends AbstractChartTabPane<Data
//默认不显示
topPane.setVisible(false);
panel1.add(topPane, BorderLayout.CENTER);
hideNullCheckBox = new UICheckBox(title4PopupWindow() + " is null, hidden");
hideNullCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Null_Hide", title4PopupWindow(), title4PopupWindow()));
panel2.add(hideNullCheckBox, BorderLayout.NORTH);
useTopCheckBox.addChangeListener(new ChangeListener() {
@ -120,10 +120,19 @@ public abstract class AbstractSingleFilterPane extends AbstractChartTabPane<Data
return TableLayout4VanChartHelper.createGapTableLayoutPane(coms, row, column);
}
@Override
public void registerChangeListener(UIObserverListener listener) {
this.listener = listener;
}
@Override
public boolean shouldResponseChangeListener() {
return true;
}
private void fire() {
if (this.parent != null) {
parent.attributeChanged();
if (this.listener != null) {
listener.doChange();
}
}

98
designer-chart/src/main/java/com/fr/design/chartx/component/CategorySeriesFilterPane.java

@ -0,0 +1,98 @@
package com.fr.design.chartx.component;
import com.fr.chartx.data.field.ColumnField;
import com.fr.chartx.data.field.DataFilterProperties;
import com.fr.chartx.data.field.SeriesValueCorrelationDefinition;
import com.fr.chartx.data.field.diff.MultiCategoryColumnFieldCollection;
import com.fr.design.i18n.Toolkit;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.map.designer.VanChartGroupPane;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.util.List;
/**
* @author shine
* @version 10.0
* Created by shine on 2019/9/26
*/
public class CategorySeriesFilterPane extends JPanel {
private AbstractSingleFilterPane seriesFilterPane;
private AbstractSingleFilterPane categoryFilterPane;
public CategorySeriesFilterPane() {
seriesFilterPane = new AbstractSingleFilterPane() {
@Override
public String title4PopupWindow() {
return Toolkit.i18nText("Fine-Design_Chart_Series");
}
};
categoryFilterPane = new AbstractSingleFilterPane() {
@Override
public String title4PopupWindow() {
return Toolkit.i18nText("Fine-Design_Chart_Style_Category");
}
};
JPanel groupPane = new VanChartGroupPane(new String[]{seriesFilterPane.title4PopupWindow(), categoryFilterPane.title4PopupWindow()}
, new JPanel[]{seriesFilterPane, categoryFilterPane}) {
};
JPanel contentPane = new JPanel(new BorderLayout());
contentPane.add(new JPanel(), BorderLayout.NORTH);
contentPane.add(groupPane, BorderLayout.CENTER);
this.setLayout(new BorderLayout());
this.add(TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), contentPane), BorderLayout.CENTER);
}
public void populateMultiCategoryFieldCollection(MultiCategoryColumnFieldCollection fieldCollection) {
SeriesValueCorrelationDefinition seriesValueCorrelationDefinition = fieldCollection.getSeriesValueCorrelationDefinition();
if (seriesValueCorrelationDefinition != null) {
populateSeries(seriesValueCorrelationDefinition.getFilterProperties());
}
List<ColumnField> categoryList = fieldCollection.getCategoryList();
if (!categoryList.isEmpty()) {
populateCategory(categoryList.get(0).getFilterProperties());
}
}
public void updateMultiCategoryFieldCollection(MultiCategoryColumnFieldCollection fieldCollection) {
SeriesValueCorrelationDefinition seriesValueCorrelationDefinition = fieldCollection.getSeriesValueCorrelationDefinition();
if (seriesValueCorrelationDefinition != null) {
seriesValueCorrelationDefinition.setFilterProperties(updateSeries());
}
List<ColumnField> categoryList = fieldCollection.getCategoryList();
if (!categoryList.isEmpty()) {
categoryList.get(0).setFilterProperties(updateCategory());
}
}
private void populateSeries(DataFilterProperties series) {
seriesFilterPane.populateBean(series);
}
private void populateCategory(DataFilterProperties category) {
categoryFilterPane.populateBean(category);
}
private DataFilterProperties updateSeries() {
return seriesFilterPane.updateBean();
}
private DataFilterProperties updateCategory() {
return categoryFilterPane.updateBean();
}
}

6
designer-chart/src/main/java/com/fr/design/chartx/component/MultiTinyFormulaPane.java

@ -8,6 +8,12 @@ import com.fr.design.formula.TinyFormulaPane;
* Created by shine on 2019/4/12.
*/
public class MultiTinyFormulaPane extends AbstractMultiComponentPane<TinyFormulaPane> {
@Override
protected int componentWidth() {
return 116;
}
@Override
protected TinyFormulaPane createFirstFieldComponent() {
return new TinyFormulaPane();

76
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiCategoryCellDataFieldsPane.java

@ -1,14 +1,14 @@
package com.fr.design.chartx.fields.diff;
import com.fr.chartx.data.field.ColumnField;
import com.fr.chartx.data.field.SeriesValueCorrelationDefinition;
import com.fr.chartx.data.field.diff.MultiCategoryColumnFieldCollection;
import com.fr.design.chartx.component.AbstractSingleFilterPane;
import com.fr.design.chartx.component.CategorySeriesFilterPane;
import com.fr.design.chartx.component.MultiTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.van.chart.map.designer.VanChartGroupPane;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.util.List;
/**
@ -18,43 +18,21 @@ public class MultiCategoryCellDataFieldsPane extends AbstractCellDataFieldsWithS
private MultiTinyFormulaPane multiCategoryPane;
private AbstractSingleFilterPane seriesFilterPane;
private AbstractSingleFilterPane categoryFilterPane;
private void createMultiFormulaPane() {
if (multiCategoryPane == null) {
multiCategoryPane = new MultiTinyFormulaPane();
}
}
@Override
protected JPanel createNorthPane() {
createMultiFormulaPane();
return multiCategoryPane;
}
private CategorySeriesFilterPane filterPane;
@Override
protected JPanel createSouthPane() {
if (seriesFilterPane == null) {
seriesFilterPane = new AbstractSingleFilterPane() {
@Override
public String title4PopupWindow() {
//todo@shinerefactor
return "series";
}
};
categoryFilterPane = new AbstractSingleFilterPane() {
@Override
public String title4PopupWindow() {
return "category";
}
};
}
return new VanChartGroupPane(new String[]{seriesFilterPane.title4PopupWindow(), categoryFilterPane.title4PopupWindow()}
, new JPanel[]{seriesFilterPane, categoryFilterPane}) {
};
protected void initComponents() {
multiCategoryPane = new MultiTinyFormulaPane();
filterPane = new CategorySeriesFilterPane();
JPanel northPane = new JPanel(new BorderLayout(0, 6));
northPane.add(multiCategoryPane, BorderLayout.NORTH);
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
@ -64,9 +42,6 @@ public class MultiCategoryCellDataFieldsPane extends AbstractCellDataFieldsWithS
@Override
protected TinyFormulaPane[] formulaPanes() {
createMultiFormulaPane();
List<TinyFormulaPane> list = multiCategoryPane.componentList();
return list.toArray(new TinyFormulaPane[list.size()]);
}
@ -80,15 +55,7 @@ public class MultiCategoryCellDataFieldsPane extends AbstractCellDataFieldsWithS
populateSeriesValuePane(multiCategoryColumnFieldCollection);
SeriesValueCorrelationDefinition seriesValueCorrelationDefinition = multiCategoryColumnFieldCollection.getSeriesValueCorrelationDefinition();
if (seriesValueCorrelationDefinition != null) {
seriesFilterPane.populateBean(seriesValueCorrelationDefinition.getFilterProperties());
}
if (categoryList != null && !categoryList.isEmpty()) {
categoryFilterPane.populateBean(categoryList.get(0).getFilterProperties());
}
filterPane.populateMultiCategoryFieldCollection(multiCategoryColumnFieldCollection);
}
@Override
@ -101,14 +68,7 @@ public class MultiCategoryCellDataFieldsPane extends AbstractCellDataFieldsWithS
updateSeriesValuePane(fieldCollection);
SeriesValueCorrelationDefinition seriesValueCorrelationDefinition = fieldCollection.getSeriesValueCorrelationDefinition();
if (seriesValueCorrelationDefinition != null) {
seriesValueCorrelationDefinition.setFilterProperties(seriesFilterPane.updateBean());
}
if (categoryList != null && !categoryList.isEmpty()) {
categoryList.get(0).setFilterProperties(categoryFilterPane.updateBean());
}
filterPane.updateMultiCategoryFieldCollection(fieldCollection);
return fieldCollection;
}

81
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiCategoryDataSetFieldsPane.java

@ -1,14 +1,15 @@
package com.fr.design.chartx.fields.diff;
import com.fr.chartx.data.field.ColumnField;
import com.fr.chartx.data.field.SeriesValueCorrelationDefinition;
import com.fr.chartx.data.field.diff.MultiCategoryColumnFieldCollection;
import com.fr.design.chartx.component.AbstractSingleFilterPane;
import com.fr.design.chartx.component.CategorySeriesFilterPane;
import com.fr.design.chartx.component.MultiComboBoxPane;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.van.chart.map.designer.VanChartGroupPane;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import java.awt.BorderLayout;
import java.util.List;
@ -19,8 +20,23 @@ public class MultiCategoryDataSetFieldsPane extends AbstractDataSetFieldsWithSer
private MultiComboBoxPane multiCategoryPane;
private AbstractSingleFilterPane seriesFilterPane;
private AbstractSingleFilterPane categoryFilterPane;
private CategorySeriesFilterPane filterPane;
@Override
protected void initComponents() {
multiCategoryPane = new MultiComboBoxPane();
filterPane = new CategorySeriesFilterPane();
JPanel northPane = new JPanel(new BorderLayout(0, 6));
northPane.add(multiCategoryPane, BorderLayout.NORTH);
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() {
@ -29,44 +45,10 @@ public class MultiCategoryDataSetFieldsPane extends AbstractDataSetFieldsWithSer
@Override
protected UIComboBox[] filedComboBoxes() {
List<UIComboBox> list = initMultiCategoryPane().componentList();
List<UIComboBox> list = multiCategoryPane.componentList();
return list.toArray(new UIComboBox[list.size()]);
}
private MultiComboBoxPane initMultiCategoryPane() {
if (multiCategoryPane == null) {
multiCategoryPane = new MultiComboBoxPane();
}
return multiCategoryPane;
}
@Override
protected JPanel createNorthPane() {
return initMultiCategoryPane();
}
@Override
protected JPanel createSouthPane() {
if (seriesFilterPane == null) {
seriesFilterPane = new AbstractSingleFilterPane() {
@Override
public String title4PopupWindow() {
//todo@shinerefactor
return "series";
}
};
categoryFilterPane = new AbstractSingleFilterPane() {
@Override
public String title4PopupWindow() {
return "category";
}
};
}
return new VanChartGroupPane(new String[]{seriesFilterPane.title4PopupWindow(), categoryFilterPane.title4PopupWindow()}
, new JPanel[]{seriesFilterPane, categoryFilterPane}) {
};
}
@Override
public void refreshBoxListWithSelectTableData(List columnNameList) {
super.refreshBoxListWithSelectTableData(columnNameList);
@ -81,15 +63,7 @@ public class MultiCategoryDataSetFieldsPane extends AbstractDataSetFieldsWithSer
populateSeriesValuePane(multiCategoryColumnFieldCollection);
SeriesValueCorrelationDefinition seriesValueCorrelationDefinition = multiCategoryColumnFieldCollection.getSeriesValueCorrelationDefinition();
if (seriesValueCorrelationDefinition != null) {
seriesFilterPane.populateBean(seriesValueCorrelationDefinition.getFilterProperties());
}
if (categoryList != null && !categoryList.isEmpty()) {
categoryFilterPane.populateBean(categoryList.get(0).getFilterProperties());
}
filterPane.populateMultiCategoryFieldCollection(multiCategoryColumnFieldCollection);
}
@Override
@ -102,14 +76,7 @@ public class MultiCategoryDataSetFieldsPane extends AbstractDataSetFieldsWithSer
updateSeriesValuePane(columnFieldCollection);
SeriesValueCorrelationDefinition seriesValueCorrelationDefinition = columnFieldCollection.getSeriesValueCorrelationDefinition();
if (seriesValueCorrelationDefinition != null) {
seriesValueCorrelationDefinition.setFilterProperties(seriesFilterPane.updateBean());
}
if (categoryList != null && !categoryList.isEmpty()) {
categoryList.get(0).setFilterProperties(categoryFilterPane.updateBean());
}
filterPane.updateMultiCategoryFieldCollection(columnFieldCollection);
return columnFieldCollection;
}

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

@ -59,7 +59,7 @@ public class StructureCellDataFieldsPane extends AbstractCellDataFieldsPane<Stru
nodeName,
nodeId,
parentId,
nodeValue,
seriesName,
nodeValue,
};
}

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

@ -63,7 +63,7 @@ public class StructureDataSetFieldsPane extends AbstractDataSetFieldsPane<Struct
nodeName,
nodeId,
parentId,
nodeValue,
seriesName,
nodeValue,
calculateCombox
};

26
designer-chart/src/main/java/com/fr/van/chart/column/ColumnIndependentVanChartInterface.java → designer-chart/src/main/java/com/fr/van/chart/column/VanColumnChartTypeUI.java

@ -2,8 +2,14 @@ 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;
@ -11,7 +17,7 @@ import com.fr.van.chart.vanchart.AbstractMultiCategoryVanChartUI;
/**
* Created by Mitisky on 15/9/24.
*/
public class ColumnIndependentVanChartInterface extends AbstractMultiCategoryVanChartUI {
public class VanColumnChartTypeUI extends AbstractMultiCategoryVanChartUI {
@Override
public String getName() {
@ -60,13 +66,13 @@ public class ColumnIndependentVanChartInterface extends AbstractMultiCategoryVan
return new VanChartColumnSeriesPane(parent, plot);
}
// @Override
// public ChartDataPane getChartDataPane(AttributeChangeListener listener) {
// return new AbstractDataPane(listener) {
// @Override
// protected SingleDataPane createSingleDataPane() {
// return new SingleDataPane(new MultiCategoryDataSetFieldsPane(), new MultiCategoryCellDataFieldsPane());
// }
// };
// }
@Override
public ChartDataPane getChartDataPane(AttributeChangeListener listener) {
return new AbstractVanSingleDataPane(listener) {
@Override
protected SingleDataPane createSingleDataPane() {
return new SingleDataPane(new MultiCategoryDataSetFieldsPane(), new MultiCategoryCellDataFieldsPane());
}
};
}
}

17
designer-chart/src/main/java/com/fr/van/chart/structure/desinger/StructureIndependentVanChartInterface.java → designer-chart/src/main/java/com/fr/van/chart/structure/desinger/VanStructureChartTypeUI.java

@ -3,6 +3,10 @@ package com.fr.van.chart.structure.desinger;
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.StructureCellDataFieldsPane;
import com.fr.design.chartx.fields.diff.StructureDataSetFieldsPane;
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;
@ -27,7 +31,7 @@ import com.fr.van.chart.vanchart.AbstractIndependentVanChartUI;
/**
* Created by shine on 2017/2/15.
*/
public class StructureIndependentVanChartInterface extends AbstractIndependentVanChartUI {
public class VanStructureChartTypeUI extends AbstractIndependentVanChartUI {
@Override
public AbstractChartTypePane getPlotTypePane() {
return new VanChartStructureTypePane();
@ -99,8 +103,13 @@ public class StructureIndependentVanChartInterface extends AbstractIndependentVa
return new VanChartStructureConditionPane(plot);
}
/* @Override
@Override
public ChartDataPane getChartDataPane(AttributeChangeListener listener) {
return new StructureChartDataPane(listener);
}*/
return new AbstractVanSingleDataPane(listener) {
@Override
protected SingleDataPane createSingleDataPane() {
return new SingleDataPane(new StructureDataSetFieldsPane(), new StructureCellDataFieldsPane());
}
};
}
}
Loading…
Cancel
Save