Browse Source

Merge pull request #952 in DESIGN/design from ~ZHENG/c-design:refactor/19.4.3 to refactor/19.4.3

* commit 'b9fcc636b6cdf8ebdecedf959caee8fb714f7d0e':
  增加词云的数据配置 有助于理解计算的开发工作
  柱形图数据配置界面少了一点 上次处理代码质量出的bug
research/10.0
zheng 6 years ago
parent
commit
7dd76b805d
  1. 20
      designer-chart/src/main/java/com/fr/design/chartx/WordCloudChartDataPane.java
  2. 20
      designer-chart/src/main/java/com/fr/design/chartx/WordCloundChartDataPane.java
  3. 10
      designer-chart/src/main/java/com/fr/design/chartx/component/AbstractCustomFieldComboBoxPane.java
  4. 7
      designer-chart/src/main/java/com/fr/design/chartx/fields/AbstractDataSetFieldsPane.java
  5. 6
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiCategoryDataSetFieldsPane.java
  6. 70
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/WordCloudCellDataFieldsPane.java
  7. 74
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/WordCloudDataSetFieldsPane.java
  8. 21
      designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/WordCloudIndependentVanChartInterface.java

20
designer-chart/src/main/java/com/fr/design/chartx/WordCloudChartDataPane.java

@ -0,0 +1,20 @@
package com.fr.design.chartx;
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.gui.frpane.AttributeChangeListener;
/**
* Created by shine on 2019/5/22.
*/
public class WordCloudChartDataPane extends MultiCategoryChartDataPane {
public WordCloudChartDataPane(AttributeChangeListener listener) {
super(listener);
}
@Override
protected SingleDataPane createSingleDataPane() {
return new SingleDataPane(new WordCloudDataSetFieldsPane(), new WordCloudCellDataFieldsPane());
}
}

20
designer-chart/src/main/java/com/fr/design/chartx/WordCloundChartDataPane.java

@ -1,20 +0,0 @@
package com.fr.design.chartx;
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;
/**
* Created by shine on 2019/5/22.
*/
public class WordCloundChartDataPane extends MultiCategoryChartDataPane {
public WordCloundChartDataPane(AttributeChangeListener listener) {
super(listener);
}
@Override
protected SingleDataPane createSingleDataPane() {
return new SingleDataPane(new MultiCategoryDataSetFieldsPane(), new MultiCategoryCellDataFieldsPane());
}
}

10
designer-chart/src/main/java/com/fr/design/chartx/component/AbstractCustomFieldComboBoxPane.java

@ -58,6 +58,11 @@ public abstract class AbstractCustomFieldComboBoxPane<T> extends UIComboBoxPane<
customFieldNamePane = createCustomFieldNamePane();
List<FurtherBasicBeanPane<? extends T>> list = new ArrayList<FurtherBasicBeanPane<? extends T>>();
list.add(useFieldValuePane);
list.add(paneWrapper());
return list;
}
private FurtherBasicBeanPane<? extends T> paneWrapper() {
FurtherBasicBeanPane pane = new FurtherBasicBeanPane() {
@Override
public String title4PopupWindow() {
@ -82,8 +87,9 @@ public abstract class AbstractCustomFieldComboBoxPane<T> extends UIComboBoxPane<
return null;
}
};
list.add(pane);
return list;
pane.setLayout(new BorderLayout(0, 6));
pane.add(customFieldNamePane, BorderLayout.CENTER);
return pane;
}
protected abstract AbstractUseFieldValuePane createUseFieldValuePane();

7
designer-chart/src/main/java/com/fr/design/chartx/fields/AbstractDataSetFieldsPane.java

@ -12,6 +12,7 @@ import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.CalculateComboBox;
import com.fr.design.mainframe.chart.gui.data.table.DataPaneHelper;
import com.fr.general.GeneralUtils;
import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
@ -139,4 +140,10 @@ public abstract class AbstractDataSetFieldsPane<T extends AbstractColumnFieldCol
}
}
@Override
protected String title4PopupWindow() {
return StringUtils.EMPTY;
}
}

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

@ -4,7 +4,6 @@ import com.fr.chartx.data.field.ColumnField;
import com.fr.chartx.data.field.diff.MultiCategoryColumnFieldCollection;
import com.fr.design.chartx.component.MultiComboBoxPane;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.stable.StringUtils;
import javax.swing.JPanel;
import java.util.List;
@ -61,9 +60,4 @@ public class MultiCategoryDataSetFieldsPane extends AbstractDataSetFieldsWithSer
return columnFieldCollection;
}
@Override
protected String title4PopupWindow() {
return StringUtils.EMPTY;
}
}

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

@ -0,0 +1,70 @@
package com.fr.design.chartx.fields.diff;
import com.fr.chartx.data.field.diff.WordCloudColumnFieldCollection;
import com.fr.design.chartx.fields.AbstractCellDataFieldsPane;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit;
import java.awt.Component;
/**
* Created by shine on 2019/6/18.
*/
public class WordCloudCellDataFieldsPane extends AbstractCellDataFieldsPane<WordCloudColumnFieldCollection> {
private UITextField name;
private TinyFormulaPane wordName;
private TinyFormulaPane wordValue;
@Override
protected void initComponents() {
name = new UITextField();
wordName = new TinyFormulaPane();
wordValue = new TinyFormulaPane();
super.initComponents();
}
@Override
protected String[] fieldLabels() {
return new String[]{
Toolkit.i18nText("Fine-Design_Chart_MultiPie_Series_Name"),
Toolkit.i18nText("Fine-Design_Chart_Word_Name"),
Toolkit.i18nText("Fine-Design_Chart_Word_Value")
};
}
@Override
protected TinyFormulaPane[] formulaPanes() {
return new TinyFormulaPane[]{
wordName,
wordValue
};
}
@Override
protected Component[] fieldComponents() {
return new Component[]{
name,
wordName,
wordValue
};
}
@Override
public void populateBean(WordCloudColumnFieldCollection ob) {
name.setText(ob.getTargetName());
populateField(wordName, ob.getWordName());
populateField(wordValue, ob.getWordValue());
}
@Override
public WordCloudColumnFieldCollection updateBean() {
WordCloudColumnFieldCollection result = new WordCloudColumnFieldCollection();
result.setTargetName(name.getText());
updateField(wordName, result.getWordName());
populateField(wordValue, result.getWordValue());
return result;
}
}

74
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/WordCloudDataSetFieldsPane.java

@ -0,0 +1,74 @@
package com.fr.design.chartx.fields.diff;
import com.fr.chartx.data.field.diff.WordCloudColumnFieldCollection;
import com.fr.design.chartx.fields.AbstractDataSetFieldsPane;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.chart.gui.data.CalculateComboBox;
import java.awt.Component;
/**
* Created by shine on 2019/6/18.
*/
public class WordCloudDataSetFieldsPane extends AbstractDataSetFieldsPane<WordCloudColumnFieldCollection> {
private UITextField name;
private UIComboBox wordName;
private UIComboBox wordValue;
private CalculateComboBox calculateCombox;
@Override
protected void initComponents() {
name = new UITextField();
wordName = new UIComboBox();
wordValue = new UIComboBox();
calculateCombox = new CalculateComboBox();
super.initComponents();
}
@Override
protected String[] fieldLabels() {
return new String[]{
Toolkit.i18nText("Fine-Design_Chart_MultiPie_Series_Name"),
Toolkit.i18nText("Fine-Design_Chart_Word_Name"),
Toolkit.i18nText("Fine-Design_Chart_Word_Value"),
Toolkit.i18nText("Fine-Design_Chart_Summary_Method")
};
}
@Override
protected UIComboBox[] filedComboBoxes() {
return new UIComboBox[]{
wordName,
wordValue
};
}
@Override
protected Component[] fieldComponents() {
return new Component[]{
name,
wordName,
wordValue,
calculateCombox
};
}
@Override
public void populateBean(WordCloudColumnFieldCollection ob) {
name.setText(ob.getTargetName());
populateField(wordName, ob.getWordName());
populateFunctionField(wordValue, calculateCombox, ob.getWordValue());
}
@Override
public WordCloudColumnFieldCollection updateBean() {
WordCloudColumnFieldCollection result = new WordCloudColumnFieldCollection();
result.setTargetName(name.getText());
updateField(wordName, result.getWordName());
updateFunctionField(wordValue, calculateCombox, result.getWordValue());
return result;
}
}

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

@ -3,23 +3,19 @@ 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.WordCloudChartDataPane;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
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.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.plugin.chart.base.VanChartConstants;
import com.fr.van.chart.designer.other.VanChartInteractivePaneWithOutSort;
import com.fr.van.chart.designer.other.VanChartOtherPane;
import com.fr.van.chart.designer.style.VanChartStylePane;
import com.fr.van.chart.vanchart.AbstractIndependentVanChartUI;
import com.fr.van.chart.wordcloud.designer.data.WordCloudPlotReportDataContentPane;
import com.fr.van.chart.wordcloud.designer.data.WordCloudPlotTableDataContentPane;
import com.fr.van.chart.wordcloud.designer.other.VanChartWordCloudConditionPane;
import com.fr.van.chart.wordcloud.designer.style.VanChartWordCloudSeriesPane;
import com.fr.van.chart.wordcloud.designer.type.VanChartWordCloudTypePane;
@ -50,16 +46,6 @@ public class WordCloudIndependentVanChartInterface extends AbstractIndependentVa
return "com/fr/design/images/form/toolbar/wordcloud.png";
}
@Override
public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent) {
return new WordCloudPlotReportDataContentPane();
}
@Override
public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent) {
return new WordCloudPlotTableDataContentPane();
}
@Override
public BasicBeanPane<Plot> getPlotSeriesPane(ChartStylePane parent, Plot plot) {
return new VanChartWordCloudSeriesPane(parent, plot);
@ -104,4 +90,9 @@ public class WordCloudIndependentVanChartInterface extends AbstractIndependentVa
public String getPlotTypeTitle4PopupWindow(){
return VanChartWordCloudTypePane.TITLE;
}
@Override
public ChartDataPane getChartDataPane(AttributeChangeListener listener) {
return new WordCloudChartDataPane(listener);
}
}

Loading…
Cancel
Save