Browse Source

替换过时方法

feature/big-screen
Qinghui.Liu 5 years ago
parent
commit
4b0d138b37
  1. 8
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java
  2. 4
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPaneWithAuto.java

8
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java

@ -10,10 +10,12 @@ import com.fr.design.gui.ibutton.UIColorButton;
import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont; import com.fr.general.FRFont;
import com.fr.general.GeneralUtils;
import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -144,7 +146,7 @@ public class ChartTextAttrPane extends BasicPane {
* @return 更新字 * @return 更新字
*/ */
public FRFont updateFRFont() { public FRFont updateFRFont() {
String name = Utils.objectToString(fontNameComboBox.getSelectedItem()); String name = GeneralUtils.objectToString(fontNameComboBox.getSelectedItem());
return FRFont.getInstance(name, getFontStyle(), getFontSize(), fontColor.getColor()); return FRFont.getInstance(name, getFontStyle(), getFontSize(), fontColor.getColor());
} }
@ -163,7 +165,7 @@ public class ChartTextAttrPane extends BasicPane {
} }
protected float getFontSize() { protected float getFontSize() {
return Float.parseFloat(Utils.objectToString(fontSizeComboBox.getSelectedItem())); return Float.parseFloat(GeneralUtils.objectToString(fontSizeComboBox.getSelectedItem()));
} }
public void setEnabled(boolean enabled) { public void setEnabled(boolean enabled) {
@ -218,7 +220,7 @@ public class ChartTextAttrPane extends BasicPane {
} }
protected Component[][] getComponents(JPanel buttonPane) { protected Component[][] getComponents(JPanel buttonPane) {
UILabel text = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Character"), SwingConstants.LEFT); UILabel text = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Character"), SwingConstants.LEFT);
return new Component[][]{ return new Component[][]{
new Component[]{null, null}, new Component[]{null, null},
new Component[]{text, fontNameComboBox}, new Component[]{text, fontNameComboBox},

4
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPaneWithAuto.java

@ -1,11 +1,11 @@
package com.fr.design.mainframe.chart.gui.style; package com.fr.design.mainframe.chart.gui.style;
import com.fr.base.Utils;
import com.fr.design.gui.ibutton.UIColorButton; import com.fr.design.gui.ibutton.UIColorButton;
import com.fr.design.gui.ibutton.UIColorButtonWithAuto; import com.fr.design.gui.ibutton.UIColorButtonWithAuto;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.FRFont; import com.fr.general.FRFont;
import com.fr.general.GeneralUtils;
public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane { public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane {
@ -59,7 +59,7 @@ public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane {
return AUTO_SIZE_INT; return AUTO_SIZE_INT;
} }
return Float.parseFloat(Utils.objectToString(getFontSizeComboBox().getSelectedItem())); return Float.parseFloat(GeneralUtils.objectToString(getFontSizeComboBox().getSelectedItem()));
} }
protected void setFontSize(FRFont frFont) { protected void setFontSize(FRFont frFont) {

Loading…
Cancel
Save