From 68be187652a1baba2613f713ab4ff10ac8a74ba5 Mon Sep 17 00:00:00 2001 From: obo Date: Thu, 25 Jul 2024 18:48:07 +0800 Subject: [PATCH] =?UTF-8?q?FRGUI=E5=B8=83=E5=B1=80=E9=80=82=E9=85=8DRTL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/layout/FRGUIPaneFactory.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/layout/FRGUIPaneFactory.java b/designer-base/src/main/java/com/fr/design/layout/FRGUIPaneFactory.java index e165a424f1..e56349421f 100644 --- a/designer-base/src/main/java/com/fr/design/layout/FRGUIPaneFactory.java +++ b/designer-base/src/main/java/com/fr/design/layout/FRGUIPaneFactory.java @@ -40,7 +40,7 @@ public class FRGUIPaneFactory { * @return FlowLayout对象 */ public static LayoutManager createBoxFlowLayout() { // createBoxFlowLayout 图表用到的比较多 - return new FlowLayout(FlowLayout.LEFT, 2, 0); + return new FlowLayout(BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT, 2, 0); } /** @@ -49,7 +49,7 @@ public class FRGUIPaneFactory { * @return FlowLayout对象 */ public static LayoutManager createLeftZeroLayout() { - return new FlowLayout(FlowLayout.LEFT, 0, 0); + return new FlowLayout(BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT, 0, 0); } /** @@ -77,7 +77,7 @@ public class FRGUIPaneFactory { * @return FlowLayout对象 */ public static LayoutManager createLabelFlowLayout() { // createLabelFlowLayout - return new FlowLayout(FlowLayout.LEFT); // 默认 5, 5 + return new FlowLayout(BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT); // 默认 5, 5 } /** @@ -86,7 +86,7 @@ public class FRGUIPaneFactory { * @return FlowLayout对象 */ public static LayoutManager createL_FlowLayout() { - return new FlowLayout(FlowLayout.LEFT, 10, 10); + return new FlowLayout(BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT, 10, 10); } /** @@ -225,7 +225,7 @@ public class FRGUIPaneFactory { JPanel jp = new JPanel(); UITitledBorder explainBorder = UITitledBorder.createBorderWithTitle(string); jp.setBorder(explainBorder); - jp.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); + jp.setLayout(new FlowLayout(BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT, 0, 0)); return jp; } @@ -343,7 +343,7 @@ public class FRGUIPaneFactory { public static JPanel createNormalFlowInnerContainer_M_Pane() { JPanel jp = new JPanel(); jp.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); - jp.setLayout(new FlowLayout(FlowLayout.LEFT)); + jp.setLayout(new FlowLayout(BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT)); return jp; } @@ -355,18 +355,18 @@ public class FRGUIPaneFactory { public static JPanel createLeftFlowZeroGapBorderPane() { JPanel jp = new JPanel(); jp.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); - jp.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); + jp.setLayout(new FlowLayout(BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT, 0, 0)); return jp; } /** - * 创建一个靠左流式布局,正常流式内嵌 + * 创建一个流式布局,正常流式内嵌 * * @return JPanel对象 */ public static JPanel createNormalFlowInnerContainer_S_Pane() { JPanel jp = new JPanel(); - jp.setLayout(new FlowLayout(FlowLayout.LEFT)); + jp.setLayout(new FlowLayout(BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT)); return jp; } @@ -377,7 +377,7 @@ public class FRGUIPaneFactory { */ public static JPanel createBoxFlowInnerContainer_S_Pane() { JPanel jp = new JPanel(); - jp.setLayout(new FlowLayout(FlowLayout.LEFT, 2, 2)); + jp.setLayout(new FlowLayout(BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT, 2, 2)); return jp; } @@ -416,7 +416,7 @@ public class FRGUIPaneFactory { public static JPanel createBoxFlowInnerContainer_S_Pane(int hgap, int vgap) { JPanel jp = new JPanel(); jp.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); - jp.setLayout(new FlowLayout(FlowLayout.LEFT, hgap, vgap)); + jp.setLayout(new FlowLayout(BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT, hgap, vgap)); return jp; }