From 5047480026c1ba253f1bafe09f16fcee8b3a9ae7 Mon Sep 17 00:00:00 2001 From: Starryi Date: Mon, 11 Oct 2021 16:50:13 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-60644=20=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=AE=BE=E7=BD=AE=E8=B0=83=E6=95=B4=EF=BC=8C?= =?UTF-8?q?ui=E6=98=BE=E7=A4=BA=E6=9C=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 单元格元素编辑面板和格式面板中,标签和设置项宽度使用不同方法来 设置的,会不匹配的 【改动思路】 先调整格式设置面板中的设置项与标签之间的间距,使设置项宽度与 单元格元素编辑面板中的其他设置项宽度保持一致. --- .../java/com/fr/design/gui/style/TextFontTippedPane.java | 4 +--- .../main/java/com/fr/design/gui/style/TextFormatPane.java | 6 ++---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/style/TextFontTippedPane.java b/designer-base/src/main/java/com/fr/design/gui/style/TextFontTippedPane.java index 1d8947c10..7f11b0d4b 100644 --- a/designer-base/src/main/java/com/fr/design/gui/style/TextFontTippedPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/style/TextFontTippedPane.java @@ -9,7 +9,6 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.theme.edit.ui.LabelUtils; -import com.fr.design.widget.FRWidgetFactory; import javax.swing.BorderFactory; import javax.swing.JPanel; @@ -63,8 +62,7 @@ public class TextFontTippedPane extends AbstractBasicStylePane { private JPanel createFormatTipPane() { JPanel container = FRGUIPaneFactory.createBorderLayout_S_Pane(); container.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L1, 0, 0, 0)); - UILabel formatMigratedTip = FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Report_Format_Style_Migrated_Tip")); - formatMigratedTip.setForeground(new Color(153, 153, 153)); + JTextArea formatMigratedTip = LabelUtils.createAutoWrapLabel(Toolkit.i18nText("Fine-Design_Report_Format_Style_Migrated_Tip"), new Color(153, 153, 153)); container.add(formatMigratedTip, BorderLayout.NORTH); return container; diff --git a/designer-base/src/main/java/com/fr/design/gui/style/TextFormatPane.java b/designer-base/src/main/java/com/fr/design/gui/style/TextFormatPane.java index 0372a0139..ae0a94799 100644 --- a/designer-base/src/main/java/com/fr/design/gui/style/TextFormatPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/style/TextFormatPane.java @@ -58,7 +58,6 @@ public class TextFormatPane extends AbstractBasicStylePane implements GlobalName private static final int LABEL_DELTA_WIDTH = 8; private static final int LABEL_HEIGHT = 15; //标签背景的范围 private static final int CURRENCY_FLAG_POINT = 6; - private static final Border LEFT_BORDER = BorderFactory.createEmptyBorder(0, 30, 0, 0); private static final Integer[] TYPES = new Integer[]{ FormatContents.NULL, FormatContents.NUMBER, @@ -127,13 +126,12 @@ public class TextFormatPane extends AbstractBasicStylePane implements GlobalName typeComboBox.setPreferredSize(new Dimension(155,20)); JPanel typePane = new JPanel(new BorderLayout()); typePane.add(typeComboBox, BorderLayout.CENTER); - typePane.setBorder(LEFT_BORDER); -// centerPane.setBorder(LEFT_BORDER); + typePane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); JPanel option = new JPanel(new BorderLayout()); option.add(new UILabel(Toolkit.i18nText("Fine-Design_Report_Base_Option"), SwingConstants.LEFT), BorderLayout.WEST); roundingBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Base_Option_Half_Up")); - roundingBox.setBorder(BorderFactory.createEmptyBorder(0, 40, 0, 0)); + roundingBox.setBorder(BorderFactory.createEmptyBorder(0, 30, 0, 0)); roundingBox.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) {