Browse Source

Merge pull request #1269 in DESIGN/design from ~WIM.ZHAI/xdesign:feature/10.0 to feature/10.0

* commit '47be036bd639601d8a6299e3b653b65056566a0d':
  CHART-4248 refactor 多层饼图数据面板补系列名字段
persist/11.0
Wim.Zhai 5 years ago
parent
commit
f3de98da44
  1. 22
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiPieCellDataFieldsPane.java
  2. 25
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiPieDataSetFieldsPane.java

22
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiPieCellDataFieldsPane.java

@ -4,10 +4,19 @@ import com.fr.chartx.data.field.diff.MultiPieColumnFieldCollection;
import com.fr.design.chartx.component.MultiTinyFormulaPaneWithUISpinner;
import com.fr.design.chartx.fields.AbstractCellDataFieldsPane;
import com.fr.design.formula.TinyFormulaPane;
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.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Component;
/**
* Created by shine on 2019/6/18.
@ -30,7 +39,18 @@ public class MultiPieCellDataFieldsPane extends AbstractCellDataFieldsPane<Multi
@Override
protected JPanel createNorthPane() {
return levelPane;
double p = TableLayout.PREFERRED;
Component[][] components = new Component[][]{
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_MultiPie_Series_Name"), SwingConstants.LEFT), nameField}
};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, new double[]{p}, new double[]{ChartDataPane.LABEL_WIDTH, 122}, 0, 6);
panel.setBorder(BorderFactory.createEmptyBorder(6, 0, 0, 15));
JPanel northPane = new JPanel(new BorderLayout(0, 6));
northPane.add(panel, BorderLayout.NORTH);
northPane.add(new JSeparator(), BorderLayout.CENTER);
northPane.add(levelPane, BorderLayout.SOUTH);
return northPane;
}
@Override

25
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MultiPieDataSetFieldsPane.java

@ -4,11 +4,19 @@ import com.fr.chartx.data.field.diff.MultiPieColumnFieldCollection;
import com.fr.design.chartx.component.MultiComboBoxPaneWithUISpinner;
import com.fr.design.chartx.fields.AbstractDataSetFieldsPane;
import com.fr.design.gui.icombobox.UIComboBox;
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.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.CalculateComboBox;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Component;
import java.util.List;
@ -35,7 +43,20 @@ public class MultiPieDataSetFieldsPane extends AbstractDataSetFieldsPane<MultiPi
@Override
protected JPanel createNorthPane() {
return levelComboBoxPane;
double p = TableLayout.PREFERRED;
Component[][] components = new Component[][]{
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_MultiPie_Series_Name"), SwingConstants.LEFT), nameField}
};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, new double[]{p}, new double[]{ChartDataPane.LABEL_WIDTH, 122}, 0, 6);
panel.setBorder(BorderFactory.createEmptyBorder(6, 0, 0, 15));
JPanel northPane = new JPanel(new BorderLayout(0, 6));
northPane.add(panel, BorderLayout.NORTH);
northPane.add(new JSeparator(), BorderLayout.CENTER);
northPane.add(levelComboBoxPane, BorderLayout.SOUTH);
return northPane;
}
@ -85,7 +106,7 @@ public class MultiPieDataSetFieldsPane extends AbstractDataSetFieldsPane<MultiPi
@Override
public MultiPieColumnFieldCollection updateBean() {
MultiPieColumnFieldCollection result = new MultiPieColumnFieldCollection();
result.setTargetName(nameField.getName());
result.setTargetName(nameField.getText());
levelComboBoxPane.update(result.getLevels());

Loading…
Cancel
Save