|
|
@ -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); |
|
|
|