From 835d4134fc6a4737831cfe5c59aa1cc595a60e1b Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Tue, 7 Mar 2023 10:35:32 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-88335=20=E6=A8=A1=E6=9D=BF=E6=9F=A5?= =?UTF-8?q?=E6=89=BE=E6=9B=BF=E6=8D=A2=E9=9D=A2=E6=9D=BF=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../replace/ui/ITReplaceMainDialog.java | 2 +- .../replace/ui/ITReplaceNorthPanel.java | 19 ++++--------------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceMainDialog.java b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceMainDialog.java index 0a49d5ba78..cf9a5ca165 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceMainDialog.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceMainDialog.java @@ -68,7 +68,7 @@ public class ITReplaceMainDialog extends UIDialog { private static final int FIRST_ROW = 0; private static final int NONE = 0; public static int selectCount = 0; - public static int MAIN_PANEL_WIDTH = 800; + public static final int MAIN_PANEL_WIDTH = 800; public static int replaceContentNum = 0; public static int replaceSettingNum = 0; public static int contentReplaceCount = 0; diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceNorthPanel.java b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceNorthPanel.java index 355f347df9..8b7d865d22 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceNorthPanel.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceNorthPanel.java @@ -18,7 +18,6 @@ import com.fr.stable.StringUtils; import javax.swing.BorderFactory; import javax.swing.ComboBoxEditor; import javax.swing.Icon; -import javax.swing.JCheckBox; import javax.swing.JPanel; import javax.swing.ScrollPaneConstants; import javax.swing.event.PopupMenuEvent; @@ -80,12 +79,12 @@ public class ITReplaceNorthPanel { //存储的5次最近输入 private int maxItemCount = 5; - private static int limit_width = 800; + private static final int LIMIT_WIDTH = 800; private static final int HEIGHT = 161; private static final int BUTTON_WIDTH = 44; private static final int GAP = 20; private static final int BUTTON_GAP = 10; - private static final int MATCH_WIDTH = limit_width; + private static final int MATCH_WIDTH = 800; private static final int COMPONENT_HEIGHT = 25; private static final int FIRST_Y = 15, SECOND_Y = 50, THIRD_Y = 85, FOURTH_Y = 120; private static final int FIRST_X = 20, SECOND_X = 80; @@ -169,16 +168,6 @@ public class ITReplaceNorthPanel { cardPanel.add(settingScrollPane, CARD_SETTING); } - /** - * 限制尺寸 - * - * @param width - */ - public void setLimitSize(int width) { - upContentPanel.setMaximumSize(new Dimension(limit_width, HEIGHT)); - upContentPanel.setPreferredSize(new Dimension(limit_width, HEIGHT)); - } - /** * 初始化模板内容查找面板 */ @@ -212,7 +201,7 @@ public class ITReplaceNorthPanel { replaceButton = new UIButton(Toolkit.i18nText("Fine-Design_Replace_Button")); searchButton = new UIButton(Toolkit.i18nText("Fine-Design_Search_Button")); - upContentPanel.setPreferredSize(new Dimension(limit_width, HEIGHT)); + upContentPanel.setPreferredSize(new Dimension(LIMIT_WIDTH, HEIGHT)); contentScrollPane = new UIScrollPane(upContentPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); upContentPanel.add(findLabel); upContentPanel.add(rangeLabel); @@ -268,7 +257,7 @@ public class ITReplaceNorthPanel { replaceSettingButton = new UIButton(Toolkit.i18nText("Fine-Design_Replace_Button")); replaceSettingButton.setEnabled(false); - upSettingPanel.setPreferredSize(new Dimension(limit_width, HEIGHT)); + upSettingPanel.setPreferredSize(new Dimension(LIMIT_WIDTH, HEIGHT)); upSettingPanel.add(findSettingLabel); upSettingPanel.add(rangeSettingLabel); upSettingPanel.add(findSettingComboBox);