diff --git a/designer-base/src/main/java/com/fr/design/constants/UIConstants.java b/designer-base/src/main/java/com/fr/design/constants/UIConstants.java index 85c2c30922..15a7c87c08 100644 --- a/designer-base/src/main/java/com/fr/design/constants/UIConstants.java +++ b/designer-base/src/main/java/com/fr/design/constants/UIConstants.java @@ -143,8 +143,6 @@ public interface UIConstants { public static final Color TAB_BUTTON_PRESS_SELECTED = new Color(236, 236, 238); public static final Color POPUP_TITLE_BACKGROUND = new Color(0xd8f2fd); public static final Color LIST_ITEM_SPLIT_LINE = new Color(0xf0f0f3); - public static final Color AUTO_FONT_COLOR = new Color(0, 0, 0, 0); - public static final Color TRANSPARENT_FONT_COLOR = new Color(255, 255, 255, 0); public static final BufferedImage DRAG_BAR = IOUtils.readImage("com/fr/design/images/control/bar.png"); diff --git a/designer-base/src/main/java/com/fr/design/gui/ibutton/UIColorButtonWithAuto.java b/designer-base/src/main/java/com/fr/design/gui/ibutton/UIColorButtonWithAuto.java index db64cba87f..c883148ca3 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ibutton/UIColorButtonWithAuto.java +++ b/designer-base/src/main/java/com/fr/design/gui/ibutton/UIColorButtonWithAuto.java @@ -1,5 +1,6 @@ package com.fr.design.gui.ibutton; +import com.fr.chart.base.ChartConstants; import com.fr.design.constants.UIConstants; import com.fr.design.style.color.ColorControlWindow; import com.fr.design.style.color.ColorControlWindowWithAuto; @@ -10,11 +11,11 @@ import java.awt.Color; public class UIColorButtonWithAuto extends UIColorButton { protected void checkColorChange(Color oldColor, Color newColor) { - if (ComparatorUtils.equals(oldColor, UIConstants.AUTO_FONT_COLOR) && !ComparatorUtils.equals(newColor, UIConstants.AUTO_FONT_COLOR)) { + if (ComparatorUtils.equals(oldColor, ChartConstants.AUTO_FONT_COLOR) && !ComparatorUtils.equals(newColor, ChartConstants.AUTO_FONT_COLOR)) { setIcon(UIConstants.FONT_ICON); } - if (!ComparatorUtils.equals(oldColor, UIConstants.AUTO_FONT_COLOR) && ComparatorUtils.equals(newColor, UIConstants.AUTO_FONT_COLOR)) { + if (!ComparatorUtils.equals(oldColor, ChartConstants.AUTO_FONT_COLOR) && ComparatorUtils.equals(newColor, ChartConstants.AUTO_FONT_COLOR)) { setIcon(UIConstants.AUTO_FONT_ICON); } diff --git a/designer-base/src/main/java/com/fr/design/style/color/ColorControlWindowWithAuto.java b/designer-base/src/main/java/com/fr/design/style/color/ColorControlWindowWithAuto.java index 46d32c7136..05da3d4b97 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/ColorControlWindowWithAuto.java +++ b/designer-base/src/main/java/com/fr/design/style/color/ColorControlWindowWithAuto.java @@ -1,5 +1,6 @@ package com.fr.design.style.color; +import com.fr.chart.base.ChartConstants; import com.fr.design.border.UIRoundedBorder; import com.fr.design.constants.UIConstants; import com.fr.design.gui.ibutton.UIButton; @@ -59,12 +60,12 @@ public abstract class ColorControlWindowWithAuto extends ColorControlWindow { protected void doTransparent() { getPopupHider().hidePopupMenu(); - setColor(UIConstants.TRANSPARENT_FONT_COLOR); + setColor(null); } protected void doAuto() { getPopupHider().hidePopupMenu(); - setColor(UIConstants.AUTO_FONT_COLOR); + setColor(ChartConstants.AUTO_FONT_COLOR); } public void customButtonPressed() { diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPaneWithAuto.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPaneWithAuto.java index 6760474e93..79863a24ce 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPaneWithAuto.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPaneWithAuto.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe.chart.gui.style; +import com.fr.chart.base.ChartConstants; import com.fr.design.gui.ibutton.UIColorButton; import com.fr.design.gui.ibutton.UIColorButtonWithAuto; import com.fr.design.i18n.Toolkit; @@ -10,7 +11,6 @@ import com.fr.general.GeneralUtils; public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane { private static final String AUTO = Toolkit.i18nText("Fine-Design_Basic_ChartF_Auto"); - private static final int AUTO_SIZE_INT = 0; private boolean isFontSizeAuto = false; private boolean isColorAuto = false; @@ -48,7 +48,7 @@ public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane { protected float getFontSize() { if (isFontSizeAuto && ComparatorUtils.equals(getFontSizeComboBox().getSelectedItem(), AUTO)) { - return AUTO_SIZE_INT; + return ChartConstants.AUTO_FONT_SIZE; } return Float.parseFloat(GeneralUtils.objectToString(getFontSizeComboBox().getSelectedItem())); @@ -56,7 +56,7 @@ public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane { protected void setFontSize(FRFont frFont) { if (getFontSizeComboBox() != null && isFontSizeAuto) { - if (frFont.getSize() == AUTO_SIZE_INT) { + if (frFont.getSize() == ChartConstants.AUTO_FONT_SIZE) { getFontSizeComboBox().setSelectedItem(AUTO); } else { getFontSizeComboBox().setSelectedItem(frFont.getSize() + ""); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeLabelDetailPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeLabelDetailPane.java index 9ead773035..0303a5a20d 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeLabelDetailPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeLabelDetailPane.java @@ -44,7 +44,7 @@ public class VanChartGaugeLabelDetailPane extends VanChartPlotLabelDetailPane { } public GaugeStyle getGaugeStyle() { - return gaugeStyle; + return ((VanChartGaugePlot)this.getPlot()).getGaugeStyle(); } public void setGaugeStyle(GaugeStyle gaugeStyle) {