From 9c30a1fc02b0c8f463fa956c5c0ce7f343542c2c Mon Sep 17 00:00:00 2001 From: obo Date: Tue, 6 Aug 2024 11:10:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8=E9=85=8D=E7=BD=AE-?= =?UTF-8?q?=E5=A1=AB=E6=8A=A5=E9=A1=B5=E9=9D=A2=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/webattr/WriteToolBarPane.java | 20 ++++++++++--------- .../design/webattr/WriteWebSettingPane.java | 6 +++--- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/webattr/WriteToolBarPane.java b/designer-realize/src/main/java/com/fr/design/webattr/WriteToolBarPane.java index a2e0c53c2f..8872d95c0f 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/WriteToolBarPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/WriteToolBarPane.java @@ -2,6 +2,7 @@ package com.fr.design.webattr; import com.fr.base.BaseUtils; import com.fr.base.ConfigManager; +import com.fr.base.i18n.BidiUtils; import com.fr.config.Configuration; import com.fr.design.ExtraDesignClassManager; import com.fr.design.dialog.BasicDialog; @@ -45,10 +46,10 @@ public class WriteToolBarPane extends AbstractEditToolBarPane { private UILabel sheetShowLocationLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Sheet_Label_Page_Display_Position")); private UIRadioButton centerRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Center_Display")); private UIRadioButton leftRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Left_Display")); - private UILabel rptShowLocationLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Show_Location") + ":", UILabel.LEFT); + private UILabel rptShowLocationLabel = new UILabel(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Show_Location"), ":"), BidiUtils.rtl() ? UILabel.RIGHT : UILabel.LEFT); private UICheckBox isUseToolBarCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Use_ToolBar")); private UIButton editToolBarButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit")); - private UILabel showListenersLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Editing_Listeners") + ":"); + private UILabel showListenersLabel = new UILabel(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Editing_Listeners"), ":")); private UICheckBox unloadCheck; private UICheckBox showWidgets; private UICheckBox isAutoStash;//自动暂存 @@ -65,20 +66,20 @@ public class WriteToolBarPane extends AbstractEditToolBarPane { bottomRadioButton.setSelected(true); sheetButtonGroup.add(topRadioButton); sheetButtonGroup.add(bottomRadioButton); - northPane.add(GUICoreUtils.createFlowPane(new Component[]{sheetShowLocationLabel, topRadioButton, bottomRadioButton}, FlowLayout.LEFT)); + northPane.add(GUICoreUtils.createFlowPane(new Component[]{sheetShowLocationLabel, topRadioButton, bottomRadioButton}, BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT)); //Sean:报表显示位置 ButtonGroup rptButtonGroup = new ButtonGroup(); leftRadioButton.setSelected(true); rptButtonGroup.add(leftRadioButton); rptButtonGroup.add(centerRadioButton); - northPane.add(GUICoreUtils.createFlowPane(new Component[]{rptShowLocationLabel, centerRadioButton, leftRadioButton}, FlowLayout.LEFT)); + northPane.add(GUICoreUtils.createFlowPane(new Component[]{rptShowLocationLabel, centerRadioButton, leftRadioButton}, BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT)); - colorBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set_Face_Write_Current_Edit_Row_Background") + ":"); + colorBox = new UICheckBox(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set_Face_Write_Current_Edit_Row_Background"), ":")); colorBox.setSelected(false); colorBox.addActionListener(colorListener); colorButton = new UINoThemeColorButton(BaseUtils.readIcon("/com/fr/design/images/gui/color/background.png")); - northPane.add(GUICoreUtils.createFlowPane(new Component[]{colorBox, colorButton}, FlowLayout.LEFT)); + northPane.add(GUICoreUtils.createFlowPane(new Component[]{colorBox, colorButton}, BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT)); unloadCheck = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Unload_Check")); unloadCheck.setSelected(true); @@ -87,7 +88,7 @@ public class WriteToolBarPane extends AbstractEditToolBarPane { showWidgets.setSelected(false); isAutoStash = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Auto_Stash")); isAutoStash.setSelected(false); - northPane.add(GUICoreUtils.createFlowPane(new Component[]{unloadCheck, showWidgets, isAutoStash}, FlowLayout.LEFT)); + northPane.add(GUICoreUtils.createFlowPane(new Component[]{unloadCheck, showWidgets, isAutoStash}, BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT)); editToolBarButton.addActionListener(editBtnListener); isUseToolBarCheckBox.setSelected(true); @@ -98,9 +99,9 @@ public class WriteToolBarPane extends AbstractEditToolBarPane { editToolBarButton.setEnabled(isUseToolBarCheckBox.isSelected()); } }); - northPane.add(GUICoreUtils.createFlowPane(new Component[]{isUseToolBarCheckBox, editToolBarButton}, FlowLayout.LEFT)); + northPane.add(GUICoreUtils.createFlowPane(new Component[]{isUseToolBarCheckBox, editToolBarButton}, BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT)); northPane.add(new UILabel()); - northPane.add(GUICoreUtils.createFlowPane(showListenersLabel, FlowLayout.LEFT)); + northPane.add(GUICoreUtils.createFlowPane(showListenersLabel, BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT)); eventPane = new EventPane(new WebWrite().supportedEvents()); JPanel center = FRGUIPaneFactory.createBorderLayout_S_Pane(); center.add(eventPane, BorderLayout.CENTER); @@ -109,6 +110,7 @@ public class WriteToolBarPane extends AbstractEditToolBarPane { ToolBarManager toolBarManager = ToolBarManager.createDefaultWriteToolBar(); toolBarManager.setToolBarLocation(Location.createTopEmbedLocation()); this.toolBarManagers = new ToolBarManager[]{toolBarManager}; + BidiUtils.applyOrientationByLocale(this); } private ActionListener editBtnListener = new ActionListener() { diff --git a/designer-realize/src/main/java/com/fr/design/webattr/WriteWebSettingPane.java b/designer-realize/src/main/java/com/fr/design/webattr/WriteWebSettingPane.java index d96bf4b779..1e99eb7009 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/WriteWebSettingPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/WriteWebSettingPane.java @@ -43,7 +43,7 @@ public class WriteWebSettingPane extends WebSettingPane { @Override protected JPanel createOtherSetPane() { - colorBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set_Background_Of_Current_Row") + ":"); + colorBox = new UICheckBox(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set_Background_Of_Current_Row"), ":")); colorBox.setSelected(true); colorButton = new UIColorButton(BaseUtils.readIcon("/com/fr/design/images/gui/color/background.png")); colorBox.addActionListener(new ActionListener() { @@ -57,7 +57,7 @@ public class WriteWebSettingPane extends WebSettingPane { //sheet标签页显示位置 topRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Top")); bottomRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Bottom")); - sheetShowLocationLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Sheet_Label_Page_Display_Position"), UILabel.LEFT); + sheetShowLocationLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Sheet_Label_Page_Display_Position"), BidiUtils.rtl() ? UILabel.RIGHT : UILabel.LEFT); ButtonGroup buttonGroup = new ButtonGroup(); bottomRadioButton.setSelected(true); buttonGroup.add(topRadioButton); @@ -65,7 +65,7 @@ public class WriteWebSettingPane extends WebSettingPane { JPanel sheetPane = GUICoreUtils.createFlowPane(new Component[]{sheetShowLocationLabel, topRadioButton, bottomRadioButton}, BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT); //Sean: 报表显示位置since 706 - rptShowLocationLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Show_Location") + ":", UILabel.LEFT); + rptShowLocationLabel = new UILabel(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Show_Location"), ":"), BidiUtils.rtl() ? UILabel.RIGHT : UILabel.LEFT); centerRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Center_Display")); leftRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Left_Display")); ButtonGroup rptShowButtonGroup = new ButtonGroup();