From 4f0a24f5e751a22ddbad8ff5483d7f45c21f4293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Wed, 17 Jul 2024 15:47:53 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-113994=20feat:TabPane=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/actions/file/PreferencePane.java | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java index 0ccef7087a..093d3079f4 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java @@ -14,6 +14,7 @@ import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionListener; import com.fr.design.editor.editor.IntegerEditor; import com.fr.design.file.SaveSomeTemplatePane; +import com.fr.design.gui.frpane.FineTabbedPane; import com.fr.design.gui.frpane.UITabbedPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIColorButton; @@ -53,6 +54,7 @@ import com.fr.io.attr.ImageExportAttr; import com.fr.locale.InterProviderFactory; import com.fr.log.FineLoggerFactory; import com.fr.report.ReportConfigManager; +import com.fr.stable.ArrayUtils; import com.fr.stable.Constants; import com.fr.stable.os.OperatingSystem; import com.fr.third.apache.logging.log4j.Level; @@ -284,8 +286,6 @@ public class PreferencePane extends BasicPane { protected void initComponents() { JPanel contentPane = this; contentPane.setLayout(FRGUIPaneFactory.createBorderLayout()); - UITabbedPane tabPane = new UITabbedPane(); - contentPane.add(tabPane, BorderLayout.CENTER); // 常用面板 JPanel generalPane = column(SETTING_V_GAP, // 功能设置 @@ -300,7 +300,6 @@ public class PreferencePane extends BasicPane { cell(createStartupPagePane()) ).weight(1).getComponent(); UIScrollPane generalScrollPane = patchScroll(generalPane); - tabPane.addTab(i18nText("Fine-Design_Basic_General"), generalScrollPane); // 高级面板 JPanel advancePane = column(SETTING_V_GAP, @@ -329,7 +328,6 @@ public class PreferencePane extends BasicPane { ).weight(1).getComponent(); useUniverseDBMCheckbox = new UICheckBox(i18nText("Fine-Design_Basic_Use_Universe_Database_Manager")); UIScrollPane adviceScrollPane = patchScroll(advancePane); - tabPane.addTab(i18nText("Fine-Design_Basic_Advanced"), adviceScrollPane); // 版本管理面板 //初始化vcs总面板 @@ -344,7 +342,14 @@ public class PreferencePane extends BasicPane { UIScrollPane vcsScrollPane = patchScroll(vcsPane); //配置面板作为vcs总面板的一张卡片 vcsParentPane.add(vcsScrollPane, VcsMovePanel.SETTING); - tabPane.addTab(i18nText("Fine-Design_Vcs_Title"), vcsParentPane); + + FineTabbedPane tabbedPane = FineTabbedPane.builder() + .addTab(i18nText("Fine-Design_Basic_General"), generalScrollPane) + .addTab(i18nText("Fine-Design_Basic_Advanced"), adviceScrollPane) + .addTab(i18nText("Fine-Design_Vcs_Title"), vcsParentPane) + .build(); + contentPane.add(tabbedPane, BorderLayout.CENTER); + } private Component createDesignerStartupPane() { @@ -669,13 +674,13 @@ public class PreferencePane extends BasicPane { } }); JPanel editPanel = column(10, - cell(supportStringToFormulaBox), - row( - cell(defaultStringToFormulaBox), - fix(10), - cell(shortCutInfoLabel), - cell(shortCutLabel) - ) + cell(supportStringToFormulaBox), + row( + cell(defaultStringToFormulaBox), + fix(10), + cell(shortCutInfoLabel), + cell(shortCutLabel) + ) ).getComponent(); return FineUIUtils.wrapComponentWithTitle(editPanel, i18nText("Fine-Design_Basic_Editor_Preference")); } @@ -809,7 +814,7 @@ public class PreferencePane extends BasicPane { languageComboBox.setFont(FRFont.getInstance("Dialog", Font.PLAIN, 12));//为了在中文系统中显示韩文 return languageComboBox; } - + private Component createStartupPagePane() { startupPageEnabledCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Startup_Page_Config_Check_Text")); UILabel descLabel = FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Startup_Page_Config_Desc"), PREFERENCE_LABEL_MAX_WIDTH);