From ed3d62003a5fa06ffe3e461473cb00371170a074 Mon Sep 17 00:00:00 2001 From: obo Date: Wed, 7 Aug 2024 18:35:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E3=80=81=E5=AD=98=E5=82=A8=E8=BF=87=E7=A8=8B=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=9B=9E=E6=BB=9A=EF=BC=8C=E5=90=8E=E9=9D=A2=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E5=A4=84=E7=90=86SplitPane?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tabledatapane/DBTableDataPane.java | 17 +++++------------ .../tabledatapane/ProcedureDataPane.java | 8 +------- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java index de861230ac..e677c29017 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java @@ -95,8 +95,6 @@ import java.util.List; public class DBTableDataPane extends AbstractTableDataPane implements SwitchableTableDataPane { private static final int BOTTOM = 6; - private static final int SQL_TEXT_PANE_WIDTH = 680; - private static final int CONNECTION_TABLE_MIN_WIDTH = 230; private static final String PREVIEW_BUTTON = Toolkit.i18nText("Fine-Design_Basic_Preview"); private static final String REFRESH_BUTTON = Toolkit.i18nText("Fine-Design_Basic_Refresh"); private ConnectionTableProcedurePane connectionTableProcedurePane; @@ -243,10 +241,10 @@ public class DBTableDataPane extends AbstractTableDataPane implemen RTextScrollPane sqlTextScrollPane = new RTextScrollPane(this.sqlTextPane); sqlTextScrollPane.setLineNumbersEnabled(true); sqlTextScrollPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC)); - sqlTextScrollPane.setPreferredSize(new Dimension(SQL_TEXT_PANE_WIDTH, 600)); + sqlTextScrollPane.setPreferredSize(new Dimension(680, 600)); JPanel paraMeanPane = new JPanel(new BorderLayout()); - paraMeanPane.setPreferredSize(new Dimension(SQL_TEXT_PANE_WIDTH, 90)); + paraMeanPane.setPreferredSize(new Dimension(680, 90)); UILabel paraMean = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Datasource_Param_DES")); paraMeanPane.add(paraMean, BorderLayout.CENTER); @@ -262,15 +260,10 @@ public class DBTableDataPane extends AbstractTableDataPane implemen box.setMinimumSize(new Dimension(300, 400)); - this.connectionTableProcedurePane.setMinimumSize(new Dimension(CONNECTION_TABLE_MIN_WIDTH, 400)); + this.connectionTableProcedurePane.setMinimumSize(new Dimension(230, 400)); this.connectionTableProcedurePane.setMaximumSize(new Dimension(500, 400)); - JSplitPane mainSplitPane; - if (BidiUtils.rtl()) { - mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, sqlSplitPane, this.connectionTableProcedurePane); - } else { - mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, this.connectionTableProcedurePane, sqlSplitPane); - } - mainSplitPane.setDividerLocation(BidiUtils.rtl() ? SQL_TEXT_PANE_WIDTH - CONNECTION_TABLE_MIN_WIDTH : CONNECTION_TABLE_MIN_WIDTH); + + JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, this.connectionTableProcedurePane, sqlSplitPane); mainSplitPane.setBorder(BorderFactory.createLineBorder(GUICoreUtils.getTitleLineBorderColor())); mainSplitPane.setOneTouchExpandable(true); contentPane.add(mainSplitPane, BorderLayout.CENTER); diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java index 0d094b25d5..e3af3a2600 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java @@ -126,16 +126,10 @@ public class ProcedureDataPane extends AbstractTableDataPane imp connectionTableProcedurePane.setMinimumSize(new Dimension(155, 500)); box.setMinimumSize(new Dimension(310, 400)); // 使用SplitPane - JSplitPane mainSplitPane; - if (BidiUtils.rtl()) { - mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, sqlSplitPane, connectionTableProcedurePane); - } else { - mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, connectionTableProcedurePane, sqlSplitPane); - } + JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, connectionTableProcedurePane, sqlSplitPane); mainSplitPane.setBorder(BorderFactory.createLineBorder(GUICoreUtils.getTitleLineBorderColor())); mainSplitPane.setOneTouchExpandable(true); this.add(mainSplitPane, BorderLayout.CENTER); - mainSplitPane.setDividerLocation(BidiUtils.rtl() ? storeProcedureContextPane.getPreferredSize().width - connectionTableProcedurePane.getPreferredSize().width : connectionTableProcedurePane.getPreferredSize().width); BidiUtils.applyOrientationByLocale(this); }