Browse Source
* commit '183f227096600b2de2db777a249dc76c2d6a8545': CHART-10465 框架图数据结构配置兼容research/11.0
Bjorn
5 years ago
5 changed files with 207 additions and 2 deletions
@ -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()); |
||||
} |
||||
} |
@ -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; |
||||
} |
||||
} |
@ -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; |
||||
} |
||||
} |
Loading…
Reference in new issue