diff --git a/designer-base/src/main/java/com/fr/design/dialog/UIDialog.java b/designer-base/src/main/java/com/fr/design/dialog/UIDialog.java index 63aea87c3c..43ac753c9d 100644 --- a/designer-base/src/main/java/com/fr/design/dialog/UIDialog.java +++ b/designer-base/src/main/java/com/fr/design/dialog/UIDialog.java @@ -1,5 +1,6 @@ package com.fr.design.dialog; +import com.fr.base.i18n.BidiUtils; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; @@ -94,8 +95,8 @@ public abstract class UIDialog extends JDialog { private JPanel createControlButtonPane() { JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - JPanel buttonsPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 10, 0)); - controlPane.add(buttonsPane, BorderLayout.EAST); + JPanel buttonsPane = new JPanel(new FlowLayout(BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT, 10, 0)); + controlPane.add(buttonsPane, BidiUtils.rtl() ? BorderLayout.WEST : BorderLayout.EAST); //增加一个自定义按钮, 可以用于eg: 设为全局配置 addCustomButton(buttonsPane); diff --git a/designer-realize/src/main/java/com/fr/design/webattr/ReportServerPrinterPane.java b/designer-realize/src/main/java/com/fr/design/webattr/ReportServerPrinterPane.java index 8a519df3cf..e9d9a56b37 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/ReportServerPrinterPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/ReportServerPrinterPane.java @@ -7,6 +7,7 @@ package com.fr.design.webattr; import javax.swing.BorderFactory; import javax.swing.JPanel; +import com.fr.base.i18n.BidiUtils; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.report.web.Printer; /** @@ -26,6 +27,7 @@ public class ReportServerPrinterPane extends JPanel { this.setBorder(BorderFactory.createEmptyBorder(6, 2, 4, 2)); serverPrinterPane = new ServerPrinterPane(); this.add(serverPrinterPane); + BidiUtils.applyOrientationByLocale(this); } public void populate(Printer printer) { diff --git a/designer-realize/src/main/java/com/fr/design/webattr/ServerPrinterPane.java b/designer-realize/src/main/java/com/fr/design/webattr/ServerPrinterPane.java index ef4dc97dca..126b39445d 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/ServerPrinterPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/ServerPrinterPane.java @@ -4,6 +4,7 @@ package com.fr.design.webattr; import com.fr.base.BaseUtils; +import com.fr.base.i18n.BidiUtils; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.DialogActionAdapter; @@ -141,7 +142,8 @@ public class ServerPrinterPane extends BasicPane { } } }); - printerDialog.setTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ReportServerP_Add_Printer") + "..."); + printerDialog.setTitle(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ReportServerP_Add_Printer"), "...")); + BidiUtils.applyOrientationByLocale(printerDialog); printerDialog.setVisible(true); } }; @@ -262,7 +264,8 @@ public class ServerPrinterPane extends BasicPane { } }); printersPane.populate(printerList.getSelectedValue().toString()); - printerDialog.setTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ReportServerP_Edit_Printer") + "..."); + printerDialog.setTitle(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ReportServerP_Edit_Printer"), "...")); + BidiUtils.applyOrientationByLocale(printerDialog); printerDialog.setVisible(true); } public void populate(Printer printer) { @@ -320,7 +323,7 @@ public class ServerPrinterPane extends BasicPane { this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setBorder(BorderFactory.createEmptyBorder(20, 5, 0, 0)); JPanel centerPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); - centerPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Printer") + ":"), BorderLayout.WEST); + centerPane.add(new UILabel(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Printer"), ":")), BorderLayout.WEST); DefaultComboBoxModel printerComboModel = new DefaultComboBoxModel(); @@ -344,7 +347,7 @@ public class ServerPrinterPane extends BasicPane { public void checkValid() throws Exception { String printerName = printerCombo.getSelectedItem().toString(); if (StringUtils.isBlank(printerName)) { - throw new Exception(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ReportServerP_The_Name_Of_Printer_Cannot_Be_Null") + "."); + throw new Exception(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ReportServerP_The_Name_Of_Printer_Cannot_Be_Null"), ".")); } }