diff --git a/designer-base/src/main/java/com/fr/design/gui/ifilechooser/JavaFxNativeFileChooser.java b/designer-base/src/main/java/com/fr/design/gui/ifilechooser/JavaFxNativeFileChooser.java index 452deb5c8..fc4b8e368 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ifilechooser/JavaFxNativeFileChooser.java +++ b/designer-base/src/main/java/com/fr/design/gui/ifilechooser/JavaFxNativeFileChooser.java @@ -163,6 +163,8 @@ public class JavaFxNativeFileChooser implements FileChooserProvider { try { latch.await(); } catch (InterruptedException ignore) { + } finally { + setShowDialogState(false); } return selectedFiles.length > 0 ? JFileChooser.APPROVE_OPTION : JFileChooser.CANCEL_OPTION; } diff --git a/designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java b/designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java index cd2b8e47a..935c9a71e 100644 --- a/designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java +++ b/designer-base/src/main/java/com/fr/design/style/AbstractSelectBox.java @@ -1,30 +1,31 @@ package com.fr.design.style; +import com.fr.design.constants.UIConstants; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.ibutton.UIButtonUI; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.style.background.BackgroundJComponent; +import com.fr.design.utils.gui.GUIPaintUtils; +import com.fr.stable.Constants; + +import javax.swing.AbstractButton; +import javax.swing.JPanel; +import javax.swing.border.AbstractBorder; +import javax.swing.event.AncestorEvent; +import javax.swing.event.AncestorListener; +import javax.swing.plaf.ButtonUI; import java.awt.BorderLayout; import java.awt.Component; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Insets; +import java.awt.Rectangle; import java.awt.RenderingHints; +import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; -import javax.swing.AbstractButton; -import javax.swing.JPanel; -import javax.swing.border.AbstractBorder; -import javax.swing.event.AncestorEvent; -import javax.swing.event.AncestorListener; -import javax.swing.plaf.ButtonUI; - -import com.fr.design.constants.UIConstants; -import com.fr.design.gui.ibutton.UIButton; -import com.fr.design.gui.ibutton.UIButtonUI; -import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.utils.gui.GUIPaintUtils; -import com.fr.design.style.background.BackgroundJComponent; -import com.fr.stable.Constants; - /** * @author kunsnat E-mail:kunsnat@gmail.com * @version 创建时间:2011-10-31 下午03:28:31 类说明: 抽象出来的弹出box. 可以弹出颜色选择, 图案选择, 纹理选择. @@ -93,6 +94,18 @@ public abstract class AbstractSelectBox extends AbstractPopBox implements Mou hidePopupMenu(); } }); + + displayComponent.addMouseListener(new MouseAdapter() { + @Override + public void mouseExited(MouseEvent e) { + Rectangle rectangle = displayComponent.getBounds(); + if (e.getY() < rectangle.y) { + //如果是从displayComponent上面离开的,隐藏弹出界面。 + hidePopupMenu(); + } + + } + }); } public void setEnabled(boolean enabled) { diff --git a/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleConstants.java b/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleConstants.java index e529fc1d6..6d0de41ce 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleConstants.java +++ b/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleConstants.java @@ -26,6 +26,8 @@ public class DefaultStyleConstants { static final Color AXIS_LINE = new Color(46, 75, 102); static final Color GRID_LINE = new Color(30, 55, 78); + static final FRFont ALERT_FONT = FRFont.getInstance(ChartBaseUtils.getLocalDefaultFont("Microsoft YaHei"), Font.PLAIN, 9, new Color(255, 0, 0)); + static final FRFont DATA_SHEET = FRFont.getInstance(ChartBaseUtils.getLocalDefaultFont("Microsoft YaHei"), Font.PLAIN, 9, new Color(159, 173, 191)); static final Color DATA_SHEET_BORDER = new Color(46, 75, 102); diff --git a/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java b/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java index 5f7e318a7..d6fc30bd5 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java +++ b/designer-chart/src/main/java/com/fr/van/chart/config/DefaultStyleHelper4Van.java @@ -9,6 +9,7 @@ import com.fr.chart.chartglyph.DataSheet; import com.fr.config.predefined.ColorFillStyle; import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.plugin.chart.PiePlot4VanChart; +import com.fr.plugin.chart.attr.axis.VanChartAlertValue; import com.fr.plugin.chart.attr.axis.VanChartAxis; import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot; @@ -69,6 +70,13 @@ public class DefaultStyleHelper4Van { return axis; } + public static void dealAxisAlert(VanChartAlertValue vanChartAlertValue) { + if (!ChartEditContext.duchampMode()) { + return; + } + vanChartAlertValue.setAlertFont(DefaultStyleConstants.ALERT_FONT); + } + static void dealVanPlotCommonAttr(Plot plot) { if (!ChartEditContext.duchampMode()) { return; diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/ChartNameObjectCreator.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/ChartNameObjectCreator.java index 8a5a33ca8..4d8bbe990 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/ChartNameObjectCreator.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/ChartNameObjectCreator.java @@ -3,10 +3,11 @@ package com.fr.van.chart.designer.style.background; import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.controlpane.NameObjectCreator; import com.fr.design.gui.controlpane.UnrepeatedNameHelper; -import com.fr.log.FineLoggerFactory; import com.fr.general.NameObject; +import com.fr.log.FineLoggerFactory; import com.fr.plugin.chart.attr.axis.VanChartAlertValue; import com.fr.stable.Nameable; +import com.fr.van.chart.config.DefaultStyleHelper4Van; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; @@ -37,6 +38,7 @@ public class ChartNameObjectCreator extends NameObjectCreator { VanChartAlertValue vanChartAlertValue = constructor.newInstance(); vanChartAlertValue.setAxisNamesArray((String[]) object); vanChartAlertValue.setAxisName(((String[]) object)[0]); + DefaultStyleHelper4Van.dealAxisAlert(vanChartAlertValue); return new NameObject(helper.createUnrepeatedName(this.menuName()), vanChartAlertValue); } catch (NoSuchMethodException e) {