Browse Source

沿用以前的透明颜色、修改getGaugeStyle

feature/big-screen
Qinghui.Liu 5 years ago
parent
commit
83872631ae
  1. 2
      designer-base/src/main/java/com/fr/design/constants/UIConstants.java
  2. 5
      designer-base/src/main/java/com/fr/design/gui/ibutton/UIColorButtonWithAuto.java
  3. 5
      designer-base/src/main/java/com/fr/design/style/color/ColorControlWindowWithAuto.java
  4. 6
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPaneWithAuto.java
  5. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeLabelDetailPane.java

2
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 TAB_BUTTON_PRESS_SELECTED = new Color(236, 236, 238);
public static final Color POPUP_TITLE_BACKGROUND = new Color(0xd8f2fd); 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 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"); public static final BufferedImage DRAG_BAR = IOUtils.readImage("com/fr/design/images/control/bar.png");

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

@ -1,5 +1,6 @@
package com.fr.design.gui.ibutton; package com.fr.design.gui.ibutton;
import com.fr.chart.base.ChartConstants;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.style.color.ColorControlWindow; import com.fr.design.style.color.ColorControlWindow;
import com.fr.design.style.color.ColorControlWindowWithAuto; import com.fr.design.style.color.ColorControlWindowWithAuto;
@ -10,11 +11,11 @@ import java.awt.Color;
public class UIColorButtonWithAuto extends UIColorButton { public class UIColorButtonWithAuto extends UIColorButton {
protected void checkColorChange(Color oldColor, Color newColor) { 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); 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); setIcon(UIConstants.AUTO_FONT_ICON);
} }

5
designer-base/src/main/java/com/fr/design/style/color/ColorControlWindowWithAuto.java

@ -1,5 +1,6 @@
package com.fr.design.style.color; package com.fr.design.style.color;
import com.fr.chart.base.ChartConstants;
import com.fr.design.border.UIRoundedBorder; import com.fr.design.border.UIRoundedBorder;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
@ -59,12 +60,12 @@ public abstract class ColorControlWindowWithAuto extends ColorControlWindow {
protected void doTransparent() { protected void doTransparent() {
getPopupHider().hidePopupMenu(); getPopupHider().hidePopupMenu();
setColor(UIConstants.TRANSPARENT_FONT_COLOR); setColor(null);
} }
protected void doAuto() { protected void doAuto() {
getPopupHider().hidePopupMenu(); getPopupHider().hidePopupMenu();
setColor(UIConstants.AUTO_FONT_COLOR); setColor(ChartConstants.AUTO_FONT_COLOR);
} }
public void customButtonPressed() { public void customButtonPressed() {

6
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; 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.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;
@ -10,7 +11,6 @@ import com.fr.general.GeneralUtils;
public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane { public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane {
private static final String AUTO = Toolkit.i18nText("Fine-Design_Basic_ChartF_Auto"); 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 isFontSizeAuto = false;
private boolean isColorAuto = false; private boolean isColorAuto = false;
@ -48,7 +48,7 @@ public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane {
protected float getFontSize() { protected float getFontSize() {
if (isFontSizeAuto && ComparatorUtils.equals(getFontSizeComboBox().getSelectedItem(), AUTO)) { if (isFontSizeAuto && ComparatorUtils.equals(getFontSizeComboBox().getSelectedItem(), AUTO)) {
return AUTO_SIZE_INT; return ChartConstants.AUTO_FONT_SIZE;
} }
return Float.parseFloat(GeneralUtils.objectToString(getFontSizeComboBox().getSelectedItem())); return Float.parseFloat(GeneralUtils.objectToString(getFontSizeComboBox().getSelectedItem()));
@ -56,7 +56,7 @@ public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane {
protected void setFontSize(FRFont frFont) { protected void setFontSize(FRFont frFont) {
if (getFontSizeComboBox() != null && isFontSizeAuto) { if (getFontSizeComboBox() != null && isFontSizeAuto) {
if (frFont.getSize() == AUTO_SIZE_INT) { if (frFont.getSize() == ChartConstants.AUTO_FONT_SIZE) {
getFontSizeComboBox().setSelectedItem(AUTO); getFontSizeComboBox().setSelectedItem(AUTO);
} else { } else {
getFontSizeComboBox().setSelectedItem(frFont.getSize() + ""); getFontSizeComboBox().setSelectedItem(frFont.getSize() + "");

2
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() { public GaugeStyle getGaugeStyle() {
return gaugeStyle; return ((VanChartGaugePlot)this.getPlot()).getGaugeStyle();
} }
public void setGaugeStyle(GaugeStyle gaugeStyle) { public void setGaugeStyle(GaugeStyle gaugeStyle) {

Loading…
Cancel
Save