Browse Source

Merge pull request #606 in DESIGN/design from ~QINGHUI.LIU/design:10.0 to 10.0

* commit 'dd18fd728ab26b9af5b71275b5b55d78c0fc9e7f':
  改命名
  更换数组
  CHART-3206 & CHART-3374 9to10
  删除多余内容
  兼容所有版本的坐标轴刻度
10.0
Qinghui.Liu 6 years ago
parent
commit
b12289a818
  1. 2
      designer-base/src/main/java/com/fr/design/style/color/ColorSelectDetailPane.java
  2. 18
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java

2
designer-base/src/main/java/com/fr/design/style/color/ColorSelectDetailPane.java

@ -95,7 +95,7 @@ public class ColorSelectDetailPane extends BasicPane {
public void stateChanged(ChangeEvent e) { public void stateChanged(ChangeEvent e) {
ColorSelectionModel model = (ColorSelectionModel) e.getSource(); ColorSelectionModel model = (ColorSelectionModel) e.getSource();
colorChooserPreview.setMyColor(model.getSelectedColor()); colorChooserPreview.setMyColor(model.getSelectedColor());
colorChooserPreview.paint(colorChooserPreview.getGraphics()); colorChooserPreview.repaint();
} }
}); });
previewPanel.add(colorChooserPreview); previewPanel.add(colorChooserPreview);

18
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java

@ -2,8 +2,8 @@ package com.fr.design.mainframe.chart.gui.style.axis;
import com.fr.base.BaseFormula; import com.fr.base.BaseFormula;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.chart.base.AxisUnitType;
import com.fr.chart.base.ChartBaseUtils; import com.fr.chart.base.ChartBaseUtils;
import com.fr.chart.base.ChartConstants;
import com.fr.chart.chartattr.Axis; import com.fr.chart.chartattr.Axis;
import com.fr.chart.chartattr.Bar2DPlot; import com.fr.chart.chartattr.Bar2DPlot;
import com.fr.chart.chartattr.NumberAxis; import com.fr.chart.chartattr.NumberAxis;
@ -78,7 +78,7 @@ public class ChartValuePane extends ChartAxisUsePane<Axis>{
axisLineStylePane = new ChartAxisLineStylePane(); axisLineStylePane = new ChartAxisLineStylePane();
zeroPane = aliagnZero4Second(); zeroPane = aliagnZero4Second();
axisReversed = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_AxisReversed")); axisReversed = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_AxisReversed"));
unitCombox = new UIComboBox(ChartConstants.UNIT_I18N_VALUES); unitCombox = new UIComboBox(AxisUnitType.getI18NValues());
formatPane = new FormatPaneWithOutFont(); formatPane = new FormatPaneWithOutFont();
axisLabelPane = new ChartAxisLabelPane(); axisLabelPane = new ChartAxisLabelPane();
dataPane = createDataDefinePane(); dataPane = createDataDefinePane();
@ -257,10 +257,10 @@ public class ChartValuePane extends ChartAxisUsePane<Axis>{
axisLineStylePane.update(axis); axisLineStylePane.update(axis);
axis.setAxisReversed(this.axisReversed.isSelected()); axis.setAxisReversed(this.axisReversed.isSelected());
String unitValue = Utils.objectToString(unitCombox.getSelectedItem()); String unitValue = Utils.objectToString(unitCombox.getSelectedItem());
if(ComparatorUtils.equals(unitValue, ChartConstants.UNIT_I18N_VALUES[0])) { if(ComparatorUtils.equals(unitValue, AxisUnitType.UNIT_NONE.toLocaleString())) {
unitValue = null; unitValue = null;
} }
numberAxis.setShowUnit(ChartConstants.getUnitValueFromKey(unitValue)); numberAxis.setShowUnit(AxisUnitType.parse(unitValue));
if(numberAxis.isSurpportAxisTitle()) { if(numberAxis.isSurpportAxisTitle()) {
updateAxisTitle(numberAxis); updateAxisTitle(numberAxis);
} }
@ -378,11 +378,13 @@ public class ChartValuePane extends ChartAxisUsePane<Axis>{
axisLineStylePane.populate(axis); axisLineStylePane.populate(axis);
axisReversed.setSelected(axis.hasAxisReversed()); axisReversed.setSelected(axis.hasAxisReversed());
String unitKey = numberAxis.getShowUnit(); String unitKey;
if(StringUtils.isBlank(unitKey)) { if(numberAxis.getShowUnit() != null) {
unitKey = ChartConstants.UNIT_I18N_KEYS[0]; unitKey = numberAxis.getShowUnit().getStringType();
}else{
unitKey = AxisUnitType.UNIT_NONE.getStringType();
} }
unitCombox.setSelectedItem(ChartConstants.getUnitKey2Value(unitKey)); unitCombox.setSelectedItem(AxisUnitType.parse(unitKey).toLocaleString());
if(numberAxis.isSurpportAxisTitle()) { if(numberAxis.isSurpportAxisTitle()) {
populateAxisTitle(axis); populateAxisTitle(axis);

Loading…
Cancel
Save