From d2b09bf5a762e102e647ca62bc38c2346f05b30c Mon Sep 17 00:00:00 2001 From: obo Date: Wed, 14 Aug 2024 22:51:46 +0800 Subject: [PATCH] =?UTF-8?q?INO-21074=20=E6=89=93=E5=BC=80=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/file/FILEChooserPane.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/file/FILEChooserPane.java b/designer-base/src/main/java/com/fr/file/FILEChooserPane.java index 72e9014024..d6076a3f79 100644 --- a/designer-base/src/main/java/com/fr/file/FILEChooserPane.java +++ b/designer-base/src/main/java/com/fr/file/FILEChooserPane.java @@ -302,7 +302,7 @@ public class FILEChooserPane extends BasicPane { locationPane.add(locationBtnPane = new LocationButtonPane(), BorderLayout.CENTER); mkdirButton = initMkdirButton(); - locationPane.add(mkdirButton, BorderLayout.EAST); + locationPane.add(mkdirButton, BorderLayout.LINE_END); JPanel centerLeftPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); // centerLeftPanel.setLayout(FRGUIPaneFactory.createBorderLayout()); @@ -474,7 +474,7 @@ public class FILEChooserPane extends BasicPane { centerRightPane.add(fileNamePane, BorderLayout.SOUTH); Component[][] outComponents = new Component[][]{ - new Component[]{GUICoreUtils.createBorderPane(new UILabel(Toolkit.i18nText("Fine-Design_Basic_App_File_Lookup_range") + ":"), BorderLayout.WEST), locationPane}, + new Component[]{GUICoreUtils.createBorderPane(new UILabel(Toolkit.i18nText("Fine-Design_Basic_App_File_Lookup_range") + ":"), BorderLayout.LINE_START), locationPane}, new Component[]{centerLeftPanel, centerRightPane}}; JPanel contentPane = TableLayoutHelper.createTableLayoutPane(outComponents, new double[]{TableLayout.PREFERRED, TableLayout.FILL}, new double[]{TableLayout.PREFERRED, TableLayout.FILL}); @@ -1781,7 +1781,7 @@ public class FILEChooserPane extends BasicPane { UILabel newNameLabel = new UILabel(Toolkit.i18nText( "Fine-Design_Basic_Enter_New_Folder_Name") ); - newNameLabel.setHorizontalAlignment(SwingConstants.RIGHT); + newNameLabel.setHorizontalAlignment(SwingConstants.TRAILING); newNameLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10)); newNameLabel.setPreferredSize(new Dimension(118, 15)); @@ -1804,7 +1804,7 @@ public class FILEChooserPane extends BasicPane { nameField.selectAll(); nameField.setPreferredSize(new Dimension(180, 20)); - JPanel topPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 5)); + JPanel topPanel = new JPanel(new FlowLayout(FlowLayout.LEADING, 0, 5)); topPanel.setBorder(BorderFactory.createEmptyBorder(15, 15, 0, 15)); topPanel.add(newNameLabel); topPanel.add(nameField); @@ -1825,13 +1825,13 @@ public class FILEChooserPane extends BasicPane { // 重名提示 warnLabel = new UILabel(); warnLabel.setPreferredSize(new Dimension(300, 30)); - warnLabel.setHorizontalAlignment(SwingConstants.LEFT); + warnLabel.setHorizontalAlignment(SwingConstants.LEADING); warnLabel.setForeground(Color.RED); warnLabel.setVisible(false); JPanel midPanel = new JPanel(new BorderLayout()); midPanel.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 15)); - midPanel.add(warnLabel, BorderLayout.WEST); + midPanel.add(warnLabel, BorderLayout.LINE_START); // 确认按钮 confirmButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Confirm")); @@ -1853,7 +1853,7 @@ public class FILEChooserPane extends BasicPane { } }); - JPanel bottomPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); + JPanel bottomPanel = new JPanel(new FlowLayout(FlowLayout.TRAILING)); bottomPanel.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 15)); bottomPanel.add(confirmButton); bottomPanel.add(cancelButton); @@ -1879,6 +1879,7 @@ public class FILEChooserPane extends BasicPane { this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); GUICoreUtils.centerWindow(this); this.setVisible(true); + BidiUtils.applyOrientationByLocale(this); } private void confirmClose() {