Browse Source

CHART-10465 框架图数据结构配置兼容

persist/11.0
白岳 5 years ago
parent
commit
183f227096
  1. 23
      designer-chart/src/main/java/com/fr/design/chartx/StructureChartDataPane.java
  2. 86
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/StructureCellDataFieldsPane.java
  3. 91
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/StructureDataSetFieldsPane.java
  4. 2
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/WordCloudCellDataFieldsPane.java
  5. 7
      designer-chart/src/main/java/com/fr/van/chart/structure/desinger/StructureIndependentVanChartInterface.java

23
designer-chart/src/main/java/com/fr/design/chartx/StructureChartDataPane.java

@ -0,0 +1,23 @@
package com.fr.design.chartx;
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.gui.frpane.AttributeChangeListener;
/**
* @author Bjorn
* @version 10.0
* Created by Bjorn on 2019-09-02
*/
public class StructureChartDataPane extends MultiCategoryChartDataPane {
public StructureChartDataPane(AttributeChangeListener listener) {
super(listener);
}
@Override
protected SingleDataPane createSingleDataPane() {
return new SingleDataPane(new StructureDataSetFieldsPane(), new StructureCellDataFieldsPane());
}
}

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

@ -0,0 +1,86 @@
package com.fr.design.chartx.fields.diff;
import com.fr.chartx.data.field.diff.StructureColumnFieldCollection;
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;
/**
* @author Bjorn
* @version 10.0
* Created by Bjorn on 2019-09-02
*/
public class StructureCellDataFieldsPane extends AbstractCellDataFieldsPane<StructureColumnFieldCollection> {
private TinyFormulaPane nodeName;
private TinyFormulaPane nodeId;
private TinyFormulaPane parentId;
private UITextField seriesName;
private TinyFormulaPane nodeValue;
@Override
protected void initComponents() {
seriesName = new UITextField();
nodeName = new TinyFormulaPane();
nodeId = new TinyFormulaPane();
parentId = new TinyFormulaPane();
nodeValue = new TinyFormulaPane();
super.initComponents();
}
@Override
protected String[] fieldLabels() {
return new String[]{
Toolkit.i18nText("Fine-Design_Chart_Node_Name"),
"id",
Toolkit.i18nText("Fine-Design_Chart_Parent_ID"),
Toolkit.i18nText("Fine-Design_Chart_MultiPie_Series_Name"),
Toolkit.i18nText("Fine-Design_Chart_Series_Value"),
};
}
@Override
protected TinyFormulaPane[] formulaPanes() {
return new TinyFormulaPane[]{
nodeName,
nodeId,
parentId,
nodeValue
};
}
@Override
protected Component[] fieldComponents() {
return new Component[]{
nodeName,
nodeId,
parentId,
nodeValue,
nodeValue,
};
}
@Override
public void populateBean(StructureColumnFieldCollection ob) {
seriesName.setText(ob.getSeriesName());
populateField(nodeName, ob.getNodeName());
populateField(nodeId, ob.getNodeId());
populateField(parentId, ob.getParentId());
populateField(nodeValue, ob.getNodeValue());
}
@Override
public StructureColumnFieldCollection updateBean() {
StructureColumnFieldCollection result = new StructureColumnFieldCollection();
result.setSeriesName(seriesName.getText());
updateField(nodeName, result.getNodeName());
updateField(nodeId, result.getNodeId());
updateField(parentId, result.getParentId());
updateField(nodeValue, result.getNodeValue());
return result;
}
}

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

@ -0,0 +1,91 @@
package com.fr.design.chartx.fields.diff;
import com.fr.chartx.data.field.diff.StructureColumnFieldCollection;
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;
/**
* @author Bjorn
* @version 10.0
* Created by Bjorn on 2019-09-02
*/
public class StructureDataSetFieldsPane extends AbstractDataSetFieldsPane<StructureColumnFieldCollection> {
private UIComboBox nodeName;
private UIComboBox nodeId;
private UIComboBox parentId;
private UITextField seriesName;
private UIComboBox nodeValue;
private CalculateComboBox calculateCombox;
@Override
protected void initComponents() {
nodeName = new UIComboBox();
nodeId = new UIComboBox();
parentId = new UIComboBox();
seriesName = new UITextField();
nodeValue = new UIComboBox();
calculateCombox = new CalculateComboBox();
super.initComponents();
}
@Override
protected String[] fieldLabels() {
return new String[]{
Toolkit.i18nText("Fine-Design_Chart_Node_Name"),
"id",
Toolkit.i18nText("Fine-Design_Chart_Parent_ID"),
Toolkit.i18nText("Fine-Design_Chart_MultiPie_Series_Name"),
Toolkit.i18nText("Fine-Design_Chart_Series_Value"),
Toolkit.i18nText("Fine-Design_Chart_Summary_Method")
};
}
@Override
protected UIComboBox[] filedComboBoxes() {
return new UIComboBox[]{
nodeName,
nodeId,
parentId,
nodeValue
};
}
@Override
protected Component[] fieldComponents() {
return new Component[]{
nodeName,
nodeId,
parentId,
nodeValue,
nodeValue,
calculateCombox
};
}
@Override
public void populateBean(StructureColumnFieldCollection ob) {
seriesName.setText(ob.getSeriesName());
populateField(nodeName, ob.getNodeName());
populateField(nodeId, ob.getNodeId());
populateField(parentId, ob.getParentId());
populateFunctionField(nodeValue, calculateCombox, ob.getNodeValue());
}
@Override
public StructureColumnFieldCollection updateBean() {
StructureColumnFieldCollection result = new StructureColumnFieldCollection();
result.setSeriesName(seriesName.getText());
updateField(nodeName, result.getNodeName());
updateField(nodeId, result.getNodeId());
updateField(parentId, result.getParentId());
updateFunctionField(nodeValue, calculateCombox, result.getNodeValue());
return result;
}
}

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

@ -64,7 +64,7 @@ public class WordCloudCellDataFieldsPane extends AbstractCellDataFieldsPane<Word
WordCloudColumnFieldCollection result = new WordCloudColumnFieldCollection();
result.setTargetName(name.getText());
updateField(wordName, result.getWordName());
populateField(wordValue, result.getWordValue());
updateField(wordValue, result.getWordValue());
return result;
}
}

7
designer-chart/src/main/java/com/fr/van/chart/structure/desinger/StructureIndependentVanChartInterface.java

@ -3,6 +3,7 @@ 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.StructureChartDataPane;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
@ -11,7 +12,6 @@ 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;
@ -81,4 +81,9 @@ public class StructureIndependentVanChartInterface extends AbstractIndependentVa
public ConditionAttributesPane getPlotConditionPane(Plot plot) {
return new VanChartStructureConditionPane(plot);
}
@Override
public ChartDataPane getChartDataPane(AttributeChangeListener listener) {
return new StructureChartDataPane(listener);
}
}

Loading…
Cancel
Save