From 1ec0db74bd6624b7e697f6d7cc81ff0396126528 Mon Sep 17 00:00:00 2001 From: obo Date: Fri, 26 Jul 2024 16:01:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E5=85=83=E6=A0=BC=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/condition/ConditionAttributesPane.java | 2 ++ .../java/com/fr/design/condition/LiteConditionPane.java | 8 +++++--- .../com/fr/design/condition/ObjectLiteConditionPane.java | 4 +++- .../main/java/com/fr/design/layout/FRGUIPaneFactory.java | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java b/designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java index 5d6ee4e5ac..aa96fe24a2 100644 --- a/designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java +++ b/designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java @@ -1,6 +1,7 @@ package com.fr.design.condition; +import com.fr.base.i18n.BidiUtils; import com.fr.common.annotations.Open; import com.fr.design.actions.UpdateAction; import com.fr.design.beans.BasicBeanPane; @@ -71,6 +72,7 @@ public abstract class ConditionAttributesPane extends BasicBeanPane { selectedItemScrollPane.setMinimumSize(new Dimension((int) selectedItemScrollPane.getPreferredSize().getWidth(), MIN_HEIGHT)); dealScrollPane(selectedItemScrollPane); propertyChangePane.add(selectedItemScrollPane); + BidiUtils.applyOrientationByLocale(this); } protected void dealScrollPane(JScrollPane scrollPane){ diff --git a/designer-base/src/main/java/com/fr/design/condition/LiteConditionPane.java b/designer-base/src/main/java/com/fr/design/condition/LiteConditionPane.java index 82c8ec340f..1a26b9196f 100644 --- a/designer-base/src/main/java/com/fr/design/condition/LiteConditionPane.java +++ b/designer-base/src/main/java/com/fr/design/condition/LiteConditionPane.java @@ -2,6 +2,7 @@ package com.fr.design.condition; import com.fr.base.BaseFormula; import com.fr.base.BaseUtils; +import com.fr.base.i18n.BidiUtils; import com.fr.data.DataConstants; import com.fr.data.condition.CommonCondition; import com.fr.data.condition.FormulaCondition; @@ -400,6 +401,7 @@ public abstract class LiteConditionPane extends BasicBeanPa public LiteConditionPane() { this.initComponents(); + BidiUtils.applyOrientationByLocale(this); } protected abstract BasicBeanPane createUnFormulaConditionPane(); @@ -439,7 +441,7 @@ public abstract class LiteConditionPane extends BasicBeanPa conditionsTree.addTreeSelectionListener(treeSelectionListener); JPanel buttonPane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1); - previewPane.add(GUICoreUtils.createBorderPane(buttonPane, BorderLayout.NORTH), BorderLayout.EAST); + previewPane.add(GUICoreUtils.createBorderPane(buttonPane, BorderLayout.NORTH), BidiUtils.rtl() ? BorderLayout.WEST : BorderLayout.EAST); initButtonPane(buttonPane); // peter:必须要检查Enabled. @@ -493,8 +495,8 @@ public abstract class LiteConditionPane extends BasicBeanPa this.add(conditonTypePane, BorderLayout.NORTH); conditonTypePane.setBorder(new ModLineBorder(ModLineBorder.BOTTOM)); - UILabel conditionTypeLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Type") + ":"); - conditonTypePane.add(conditionTypeLabel, BorderLayout.WEST); + UILabel conditionTypeLabel = new UILabel(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Type"), ":")); + conditonTypePane.add(conditionTypeLabel, BidiUtils.rtl() ? BorderLayout.EAST : BorderLayout.WEST); conditionTypeLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, DOWN_PADDING, 0)); JPanel northPane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(2); diff --git a/designer-base/src/main/java/com/fr/design/condition/ObjectLiteConditionPane.java b/designer-base/src/main/java/com/fr/design/condition/ObjectLiteConditionPane.java index c39d5b7446..6825e970a4 100644 --- a/designer-base/src/main/java/com/fr/design/condition/ObjectLiteConditionPane.java +++ b/designer-base/src/main/java/com/fr/design/condition/ObjectLiteConditionPane.java @@ -4,6 +4,8 @@ import java.awt.BorderLayout; import java.awt.Component; import javax.swing.DefaultComboBoxModel; + +import com.fr.base.i18n.BidiUtils; import com.fr.design.gui.ilable.UILabel; import javax.swing.JList; import javax.swing.JPanel; @@ -79,7 +81,7 @@ public class ObjectLiteConditionPane extends LiteConditionPane conditionValuePane = ValueEditorPaneFactory.createAllValueEditorPaneWithGlobalListener(); - Component[][] components = { { new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ConditionB_Operator") + ":"), new UILabel() }, + Component[][] components = { { new UILabel(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ConditionB_Operator"), ":")), new UILabel() }, { conditionOPComboBox, conditionValuePane } }; double p = TableLayout.PREFERRED; 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 e56349421f..5be1939bd5 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 @@ -429,7 +429,7 @@ public class FRGUIPaneFactory { */ public static JPanel createRightFlowInnerContainer_S_Pane() { JPanel jp = new JPanel(); - jp.setLayout(new FlowLayout(FlowLayout.RIGHT)); + jp.setLayout(new FlowLayout(BidiUtils.rtl() ? FlowLayout.LEFT : FlowLayout.RIGHT)); return jp; }