Browse Source

删除多余的构造函数

feature/big-screen
Qinghui.Liu 5 years ago
parent
commit
f23feb842d
  1. 11
      designer-base/src/main/java/com/fr/design/gui/ibutton/UIColorButtonWithAuto.java
  2. 5
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPaneWithAuto.java

11
designer-base/src/main/java/com/fr/design/gui/ibutton/UIColorButtonWithAuto.java

@ -6,19 +6,10 @@ import com.fr.design.style.color.ColorControlWindow;
import com.fr.design.style.color.ColorControlWindowWithAuto;
import com.fr.general.ComparatorUtils;
import javax.swing.Icon;
import java.awt.Color;
public class UIColorButtonWithAuto extends UIColorButton {
public UIColorButtonWithAuto() {
super();
}
public UIColorButtonWithAuto(Icon autoFontIcon) {
super(autoFontIcon);
}
protected void checkColorChange(Color oldColor, Color newColor) {
if (ComparatorUtils.equals(oldColor, ChartConstants.AUTO_FONT_COLOR) && !ComparatorUtils.equals(newColor, ChartConstants.AUTO_FONT_COLOR)) {
setIcon(UIConstants.FONT_ICON);
@ -44,4 +35,4 @@ public class UIColorButtonWithAuto extends UIColorButton {
return getPopupWin();
}
}
}

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

@ -1,7 +1,6 @@
package com.fr.design.mainframe.chart.gui.style;
import com.fr.chart.base.ChartConstants;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIColorButton;
import com.fr.design.gui.ibutton.UIColorButtonWithAuto;
import com.fr.design.i18n.Toolkit;
@ -36,7 +35,7 @@ public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane {
}
protected void initFontColorState() {
setFontColor(isColorAuto ? new UIColorButtonWithAuto(UIConstants.AUTO_FONT_ICON) : new UIColorButton(UIConstants.FONT_ICON));
setFontColor(isColorAuto ? new UIColorButtonWithAuto() : new UIColorButton());
}
protected Object[] getFontSizeComboBoxModel() {
@ -64,4 +63,4 @@ public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane {
getFontSizeComboBox().setSelectedItem(frFont.getSize());
}
}
}
}
Loading…
Cancel
Save