Browse Source

简化传参

feature/big-screen
Qinghui.Liu 5 years ago
parent
commit
f24b41b440
  1. 12
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeLabelDetailPane.java

12
designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeLabelDetailPane.java

@ -70,23 +70,21 @@ public class VanChartGaugeLabelDetailPane extends VanChartPlotLabelDetailPane {
return false; return false;
} }
private FontAutoType getFontAutoType(boolean isFontSizeAuto, boolean isFontColorAuto) { private FontAutoType getFontAutoType() {
if (isFontSizeAuto && isFontColorAuto) { if (isFontSizeAuto() && isFontColorAuto()) {
return FontAutoType.SIZE_AND_COLOR; return FontAutoType.SIZE_AND_COLOR;
} }
if (isFontSizeAuto) { if (isFontSizeAuto()) {
return FontAutoType.SIZE; return FontAutoType.SIZE;
} }
if (isFontColorAuto) { if (isFontColorAuto()) {
return FontAutoType.COLOR; return FontAutoType.COLOR;
} }
return FontAutoType.NONE; return FontAutoType.NONE;
} }
protected ChartTextAttrPane initTextFontPane() { protected ChartTextAttrPane initTextFontPane() {
FontAutoType type = getFontAutoType(isFontSizeAuto(), isFontColorAuto()); return new ChartTextAttrPaneWithAuto(getFontAutoType()) {
return new ChartTextAttrPaneWithAuto(type) {
protected double[] getRowSize() { protected double[] getRowSize() {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
return new double[]{p, p}; return new double[]{p, p};

Loading…
Cancel
Save