diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/UIBubbleFloatPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/UIBubbleFloatPane.java index 3433210a8c..eba2ce53bd 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/UIBubbleFloatPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/UIBubbleFloatPane.java @@ -1,5 +1,7 @@ package com.fr.design.gui.frpane; +import com.fine.theme.utils.FineUIUtils; +import com.formdev.flatlaf.util.SystemInfo; import com.fr.design.beans.BasicBeanPane; import com.fr.design.dialog.UIDialog; import com.fr.design.utils.AWTUtilities; @@ -9,15 +11,22 @@ import com.fr.stable.Constants; import javax.swing.JComponent; import javax.swing.JPanel; import javax.swing.SwingUtilities; +import javax.swing.border.Border; import java.awt.AWTEvent; +import java.awt.BasicStroke; import java.awt.BorderLayout; import java.awt.Color; +import java.awt.Component; import java.awt.Dialog; import java.awt.Frame; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Insets; import java.awt.Point; import java.awt.Polygon; import java.awt.Rectangle; import java.awt.Shape; +import java.awt.Stroke; import java.awt.Toolkit; import java.awt.Window; import java.awt.event.AWTEventListener; @@ -319,7 +328,7 @@ public abstract class UIBubbleFloatPane extends BasicBeanPane { final JPanel contentPane = (JPanel) this.getContentPane(); this.setLayout(null); contentPane.add(UIBubbleFloatPane.this); - contentPane.setBorder(null); + setContentBorder(contentPane); } /** @@ -328,5 +337,33 @@ public abstract class UIBubbleFloatPane extends BasicBeanPane { public void checkValid() throws Exception { } + + private void setContentBorder(JPanel contentPane) { + if (SystemInfo.isWindows) { + contentPane.setBorder(new Border() { + @Override + public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { + Graphics2D g2d = (Graphics2D) g; + Stroke oldStroke = g2d.getStroke(); + g2d.setStroke(new BasicStroke(2, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_ROUND)); + g2d.setColor(FineUIUtils.getUIColor("Label.borderColor", "Label.borderColor")); + g2d.drawPolygon((Polygon) getShape4Board()); + g2d.setStroke(oldStroke); + } + + @Override + public Insets getBorderInsets(Component c) { + return null; + } + + @Override + public boolean isBorderOpaque() { + return false; + } + }); + } else { + contentPane.setBorder(null); + } + } } } \ No newline at end of file diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java index 635faf5bcb..57923b1ee8 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java @@ -45,6 +45,7 @@ import java.awt.event.MouseEvent; import static com.fine.swing.ui.layout.Layouts.cell; import static com.fine.swing.ui.layout.Layouts.column; import static com.fine.swing.ui.layout.Layouts.row; +import static com.fine.theme.utils.FineUIScale.scale; /** * 属性表, 图表样式-图例 界面. @@ -52,9 +53,9 @@ import static com.fine.swing.ui.layout.Layouts.row; public class VanChartPlotLegendPane extends BasicPane { private static final long serialVersionUID = 1614283200308877353L; - private static final int WIDTH = FineUIScale.scale(165); - private static final int HEIGHT = FineUIScale.scale(100); - private static final int GAP = 20; + private static final int WIDTH = scale(165); + private static final int HEIGHT = scale(100); + private static final int GAP = scale(20); private Plot plot; @@ -161,7 +162,7 @@ public class VanChartPlotLegendPane extends BasicPane { backgroundPane = creatBackgroundPane(); fixedCheckPane = createFixedCheckPane(); JPanel panel = new JPanel(); - panel.setLayout(new BorderLayout(0, FineUIScale.scale(10))); + panel.setLayout(new BorderLayout(0, scale(10))); panel.add(createDisplayStrategy(), BorderLayout.CENTER); panel.add(fixedCheckPane, BorderLayout.SOUTH); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java index f2d9ac838f..9b1adec3ec 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java @@ -47,14 +47,15 @@ import static com.fine.swing.ui.layout.Layouts.cell; import static com.fine.swing.ui.layout.Layouts.column; import static com.fine.swing.ui.layout.Layouts.fix; import static com.fine.swing.ui.layout.Layouts.row; +import static com.fine.theme.utils.FineUIScale.scale; // 属性表-样式 标题界面 public class VanChartTitlePane extends AbstractVanChartScrollPane { private static final long serialVersionUID = -2438898431228882682L; - private static final int WIDTH = FineUIScale.scale(165); - private static final int HEIGHT = FineUIScale.scale(100); - private static final int GAP = FineUIScale.scale(20); + private static final int WIDTH = scale(165); + private static final int HEIGHT = scale(100); + private static final int GAP = scale(20); private UICheckBox isTitleVisible; private JPanel titlePane;