From 3359ddea73bbf94a4fe66706c6cbad8a6cd2b2f0 Mon Sep 17 00:00:00 2001 From: obo Date: Mon, 19 Aug 2024 17:31:25 +0800 Subject: [PATCH] =?UTF-8?q?INO-21074=20=E4=B8=BB=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E3=80=81=E7=A7=BB=E5=8A=A8=E7=AB=AF=E9=9D=A2=E6=9D=BF=E3=80=81?= =?UTF-8?q?UICombox?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/gui/icheckbox/UICheckBox.java | 6 ++++++ .../widget/ui/designer/mobile/BodyMobileDefinePane.java | 4 +++- .../src/main/java/com/fr/start/MainDesigner.java | 4 ++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/icheckbox/UICheckBox.java b/designer-base/src/main/java/com/fr/design/gui/icheckbox/UICheckBox.java index 8162c7ba86..e41193001e 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icheckbox/UICheckBox.java +++ b/designer-base/src/main/java/com/fr/design/gui/icheckbox/UICheckBox.java @@ -1,5 +1,6 @@ package com.fr.design.gui.icheckbox; +import com.fr.base.i18n.BidiUtils; import com.fr.design.constants.UIConstants; import com.fr.design.event.GlobalNameListener; import com.fr.design.event.GlobalNameObserver; @@ -40,18 +41,21 @@ public class UICheckBox extends JCheckBox implements UIObserver, GlobalNameObser super(string); setUI(new UICheckBoxUI()); initListener(); + BidiUtils.setOrientationByLocale(this); } public UICheckBox() { super(); setUI(new UICheckBoxUI()); initListener(); + BidiUtils.setOrientationByLocale(this); } public UICheckBox(String locText, boolean b) { super(locText, b); setUI(new UICheckBoxUI()); initListener(); + BidiUtils.setOrientationByLocale(this); } public UICheckBox(String locText, boolean b, boolean markMnemonic) { @@ -59,12 +63,14 @@ public class UICheckBox extends JCheckBox implements UIObserver, GlobalNameObser setUI(new UICheckBoxUI()); initListener(); this.markMnemonic = markMnemonic; + BidiUtils.setOrientationByLocale(this); } public UICheckBox(String text, Icon icon) { super(text, icon); setUI(new UICheckBoxUI()); initListener(); + BidiUtils.setOrientationByLocale(this); } protected void initListener() { diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/BodyMobileDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/BodyMobileDefinePane.java index 8327fc1ab7..77c6a8306e 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/BodyMobileDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/BodyMobileDefinePane.java @@ -1,5 +1,6 @@ package com.fr.design.widget.ui.designer.mobile; +import com.fr.base.i18n.BidiUtils; import com.fr.base.iofile.attr.FormBodyPaddingAttrMark; import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.creator.XCreator; @@ -74,7 +75,8 @@ public class BodyMobileDefinePane extends MobileWidgetDefinePane { appRelayoutCheck = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_App_ReLayout"), true); appRelayoutCheck.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); - panel.add(appRelayoutCheck); + panel.add(appRelayoutCheck, BorderLayout.LINE_START); + BidiUtils.applyOrientationByLocale(panel); final JPanel panelWrapper = FRGUIPaneFactory.createBorderLayout_S_Pane(); panelWrapper.add(panel, BorderLayout.NORTH); diff --git a/designer-realize/src/main/java/com/fr/start/MainDesigner.java b/designer-realize/src/main/java/com/fr/start/MainDesigner.java index 86505f31bd..e2ca6dcd7e 100644 --- a/designer-realize/src/main/java/com/fr/start/MainDesigner.java +++ b/designer-realize/src/main/java/com/fr/start/MainDesigner.java @@ -462,7 +462,7 @@ public class MainDesigner extends BaseDesigner { return super.resetToolBar(toolbarComponent, plus); } else { JPanel toolbarPane; - toolbarPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, TOOLBARPANEVGAP)); + toolbarPane = new JPanel(new FlowLayout(FlowLayout.LEADING, 0, TOOLBARPANEVGAP)); Dimension dim = new Dimension(); dim.height = plus.getToolBarHeight(); toolbarPane.setPreferredSize(dim); @@ -471,7 +471,7 @@ public class MainDesigner extends BaseDesigner { for (int i = 0; i < paneArray.length; i++) { toolbarPane.add(paneArray[i]); } - return toolbarPane; + return BidiUtils.applyOrientationByLocale(toolbarPane); } }