Browse Source

get改为update

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

2
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrNoColorPane.java

@ -56,6 +56,6 @@ public class ChartTextAttrNoColorPane extends ChartTextAttrPane {
public FRFont updateFRFont() { public FRFont updateFRFont() {
String name = GeneralUtils.objectToString(getFontNameComboBox().getSelectedItem()); String name = GeneralUtils.objectToString(getFontNameComboBox().getSelectedItem());
return FRFont.getInstance(name, getFontStyle(), getFontSize()); return FRFont.getInstance(name, updateFontStyle(), updateFontSize());
} }
} }

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

@ -147,10 +147,10 @@ public class ChartTextAttrPane extends BasicPane {
public FRFont updateFRFont() { public FRFont updateFRFont() {
String name = GeneralUtils.objectToString(fontNameComboBox.getSelectedItem()); String name = GeneralUtils.objectToString(fontNameComboBox.getSelectedItem());
return FRFont.getInstance(name, getFontStyle(), getFontSize(), fontColor.getColor()); return FRFont.getInstance(name, updateFontStyle(), updateFontSize(), fontColor.getColor());
} }
protected int getFontStyle() { protected int updateFontStyle() {
int style = Font.PLAIN; int style = Font.PLAIN;
if (bold.isSelected() && !italic.isSelected()) { if (bold.isSelected() && !italic.isSelected()) {
style = Font.BOLD; style = Font.BOLD;
@ -163,7 +163,7 @@ public class ChartTextAttrPane extends BasicPane {
return style; return style;
} }
protected float getFontSize() { protected float updateFontSize() {
return Float.parseFloat(GeneralUtils.objectToString(fontSizeComboBox.getSelectedItem())); return Float.parseFloat(GeneralUtils.objectToString(fontSizeComboBox.getSelectedItem()));
} }
@ -205,7 +205,7 @@ public class ChartTextAttrPane extends BasicPane {
populate(FRFont.getInstance()); populate(FRFont.getInstance());
} }
protected JPanel getContentPane (JPanel buttonPane) { protected JPanel getContentPane(JPanel buttonPane) {
double f = TableLayout.FILL; double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e}; double[] columnSize = {f, e};
@ -213,7 +213,7 @@ public class ChartTextAttrPane extends BasicPane {
return TableLayout4VanChartHelper.createGapTableLayoutPane(getComponents(buttonPane), getRowSize(), columnSize); return TableLayout4VanChartHelper.createGapTableLayoutPane(getComponents(buttonPane), getRowSize(), columnSize);
} }
protected double[] getRowSize () { protected double[] getRowSize() {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
return new double[]{p, p, p}; return new double[]{p, p, p};
} }

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

@ -42,7 +42,7 @@ public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane {
return isFontSizeAuto ? FONT_SIZES_WITH_AUTO : FONT_SIZES; return isFontSizeAuto ? FONT_SIZES_WITH_AUTO : FONT_SIZES;
} }
protected float getFontSize() { protected float updateFontSize() {
if (isFontSizeAuto && ComparatorUtils.equals(getFontSizeComboBox().getSelectedItem(), AUTO)) { if (isFontSizeAuto && ComparatorUtils.equals(getFontSizeComboBox().getSelectedItem(), AUTO)) {
return ChartConstants.AUTO_FONT_SIZE; return ChartConstants.AUTO_FONT_SIZE;
} }

Loading…
Cancel
Save