From 816bb760e239d85a99c7dd3719edd85c16f37480 Mon Sep 17 00:00:00 2001 From: Yvan Date: Fri, 9 Oct 2020 15:36:53 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-38514=20=E6=A0=87=E7=AD=BE=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E7=9A=84=E5=B1=9E=E6=80=A7=E7=95=8C=E9=9D=A2-?= =?UTF-8?q?=E5=AD=97=E4=BD=93=E5=A4=A7=E5=B0=8F=E6=98=BE=E7=A4=BA=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=20=E3=80=90=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0?= =?UTF-8?q?=E3=80=91=E6=A0=87=E7=AD=BE=E5=B1=9E=E6=80=A7=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=EF=BC=8C=E8=B7=9F=E5=AD=97=E4=BD=93=E6=9C=89=E5=85=B3=E7=9A=84?= =?UTF-8?q?=E4=B8=80=E5=9D=97=E7=94=B1FRFontPane=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=EF=BC=8C=E8=BF=99=E4=B8=AA=E7=95=8C=E9=9D=A2=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E5=AD=97=E4=BD=93=E5=A4=A7=E5=B0=8F=E7=9A=84fontSizeComboBox?= =?UTF-8?q?=E4=BC=9A=E5=B0=86=E6=8E=A5=E6=94=B6=E5=88=B0=E7=9A=84=E5=80=BC?= =?UTF-8?q?=E8=BD=AC=E5=8C=96=E4=B8=BA=E6=B5=AE=E7=82=B9=E6=95=B0=E8=80=8C?= =?UTF-8?q?=E4=B8=8D=E6=98=AF=E6=95=B4=E6=95=B0=EF=BC=8C=E5=8F=98=E6=88=90?= =?UTF-8?q?=E6=B5=AE=E7=82=B9=E6=95=B0=E4=B9=8B=E5=90=8E=E4=BC=9A=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8=E7=9A=84=E6=83=85?= =?UTF-8?q?=E5=86=B5=20=E3=80=90=E6=94=B9=E5=8A=A8=E6=80=9D=E8=B7=AF?= =?UTF-8?q?=E3=80=9117=E5=B9=B4Momeak=E7=9A=84=E4=B8=80=E4=B8=AA=E6=94=B9?= =?UTF-8?q?=E5=8A=A8=EF=BC=88=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=EF=BC=89?= =?UTF-8?q?=E5=B0=86=E5=AD=97=E4=BD=93=E5=A4=A7=E5=B0=8F=E4=BB=8E=E6=95=B4?= =?UTF-8?q?=E6=95=B0=E4=BF=AE=E6=94=B9=E4=B8=BA=E6=B5=AE=E7=82=B9=E6=95=B0?= =?UTF-8?q?=EF=BC=8C=E8=80=83=E8=99=91=E5=88=B0=E8=BF=99=E4=B8=80=E7=82=B9?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E9=87=87=E5=8F=96=E6=94=B9=E5=9B=9E=E6=95=B4?= =?UTF-8?q?=E6=95=B0=E7=9A=84=E4=BF=AE=E6=94=B9=E6=96=B9=E6=A1=88=EF=BC=8C?= =?UTF-8?q?=E8=80=8C=E6=98=AF=E5=B0=86fontSizeComboBox=E4=B8=8E=E5=89=8D?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E7=BB=84=E4=BB=B6=E4=B9=8B=E9=97=B4=E7=9A=84?= =?UTF-8?q?=E9=97=B4=E9=9A=99=E5=87=8F=E5=B0=8F=EF=BC=8CTableLayout?= =?UTF-8?q?=E4=B8=8BfontSizeComboBox=E5=B0=B1=E4=BC=9A=E8=A2=AB=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=8B=89=E9=95=BF=EF=BC=8C=E6=8B=89=E9=95=BF=E5=90=8E?= =?UTF-8?q?=E8=83=BD=E5=A4=9F=E5=AE=8C=E6=95=B4=E6=98=BE=E7=A4=BA=E5=AD=97?= =?UTF-8?q?=E4=BD=93=E5=A4=A7=E5=B0=8F=EF=BC=8C=E6=94=B9=E5=8A=A8=E6=95=88?= =?UTF-8?q?=E6=9E=9C=E5=B7=B2=E7=BB=8F=E9=80=9A=E8=BF=87=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E7=A1=AE=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/style/FRFontPane.java | 25 ++++++++++++++++--- .../widget/ui/designer/LabelDefinePane.java | 4 ++- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/style/FRFontPane.java b/designer-base/src/main/java/com/fr/design/gui/style/FRFontPane.java index 9ce63abe3..f806ded06 100644 --- a/designer-base/src/main/java/com/fr/design/gui/style/FRFontPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/style/FRFontPane.java @@ -25,10 +25,20 @@ import com.fr.general.FRFont; import com.fr.stable.Constants; -import javax.swing.*; +import javax.swing.BorderFactory; +import javax.swing.JFrame; +import javax.swing.JPanel; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.CardLayout; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.GridLayout; +import java.awt.RenderingHints; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.util.Vector; @@ -67,11 +77,20 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse private UIToggleButton subPane; private JPanel linePane; private int italic_bold; + /** + * LeftPane和RightPane之间的间隙,也是fontSizeStyleComboBox与fontSizeComboBox之间的间隙,之前的默认值为VGAP_LARGE + */ + private int hGapBetweenLeftPaneAndRightPane = LayoutConstants.VGAP_LARGE; public FRFontPane() { this.initComponents(); } + public FRFontPane(int hGapBetweenLeftPaneAndRightPane) { + this.hGapBetweenLeftPaneAndRightPane = hGapBetweenLeftPaneAndRightPane; + this.initComponents(); + } + public static void main(String[] args) { JFrame jf = new JFrame("test"); jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); @@ -345,7 +364,7 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse private JPanel createPane() { JPanel createPane = new JPanel(new BorderLayout()); createPane.add(fontNameComboBox, BorderLayout.NORTH); - JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{createLeftPane(), createRightPane()}}, TableLayoutHelper.FILL_LASTCOLUMN, LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_LARGE); + JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{createLeftPane(), createRightPane()}}, TableLayoutHelper.FILL_LASTCOLUMN, hGapBetweenLeftPaneAndRightPane, LayoutConstants.VGAP_LARGE); jPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); createPane.add(jPanel, BorderLayout.CENTER); return createPane; diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java index d4ebf74ee..1c30b1a55 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java @@ -1,6 +1,7 @@ package com.fr.design.widget.ui.designer; import com.fr.base.BaseUtils; +import com.fr.design.constants.LayoutConstants; import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.creator.XCreator; import com.fr.design.foldablepane.UIExpandablePane; @@ -58,7 +59,8 @@ public class LabelDefinePane extends AbstractDataModify