From 687f8cfe1f45ef8d5674047eeedc6d50fd626084 Mon Sep 17 00:00:00 2001 From: obo Date: Tue, 6 Aug 2024 15:09:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=92=E5=85=A5-=E6=95=B0=E6=8D=AE=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/gui/frpane/UITabbedPane.java | 2 ++ .../fr/design/dscolumn/DSColumnAdvancedPane.java | 13 +++++++------ .../fr/design/dscolumn/DSColumnConditionsPane.java | 5 +++-- .../fr/design/dscolumn/ResultSetGroupPopUpPane.java | 7 ++++--- .../fr/design/dscolumn/SelectedDataColumnPane.java | 5 +++-- .../com/fr/design/expand/ConditionParentPane.java | 10 ++++++---- 6 files changed, 25 insertions(+), 17 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/UITabbedPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/UITabbedPane.java index 27cff9c5e3..3079c28782 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/UITabbedPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/UITabbedPane.java @@ -1,5 +1,6 @@ package com.fr.design.gui.frpane; +import com.fr.base.i18n.BidiUtils; import com.fr.design.dialog.FineJOptionPane; import com.fr.general.ComparatorUtils; @@ -25,6 +26,7 @@ public class UITabbedPane extends JTabbedPane{ public UITabbedPane() { super(); + BidiUtils.setOrientationByLocale(this); } public UITabbedPane(int tabPlacement) { diff --git a/designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnAdvancedPane.java b/designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnAdvancedPane.java index e1b8a676ad..2dbf17a89a 100644 --- a/designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnAdvancedPane.java +++ b/designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnAdvancedPane.java @@ -1,6 +1,7 @@ package com.fr.design.dscolumn; import com.fr.base.BaseFormula; +import com.fr.base.i18n.BidiUtils; import com.fr.design.border.UITitledBorder; import com.fr.design.data.DesignTableDataManager; import com.fr.design.dialog.BasicPane; @@ -248,7 +249,7 @@ public class DSColumnAdvancedPane extends BasicPane { private static class SortPane extends CellDSColumnSortPane { SortPane() { - this.setLayout(new FlowLayout(FlowLayout.LEFT)); + this.setLayout(new FlowLayout(BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT)); } protected boolean needSortHeaderPane() { @@ -305,14 +306,14 @@ public class DSColumnAdvancedPane extends BasicPane { //not define pane - JPanel undefinedPane = GUICoreUtils.createFlowPane(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Undefined")), FlowLayout.LEFT); + JPanel undefinedPane = GUICoreUtils.createFlowPane(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Undefined")), BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT); topFormulaPane = new JFormulaField("-1"); bottomFormulaPane = new JFormulaField("-1"); serialTextField = new UITextField(18); JPanel oddPane = GUICoreUtils.createFlowPane(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Bind_Column_Result_Serial_Number_Start_From_1") - + " " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Bind_Column_Odd_Selected_(1,3,5...)")), FlowLayout.LEFT); + + " " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Bind_Column_Odd_Selected_(1,3,5...)")), BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT); JPanel evenPane = GUICoreUtils.createFlowPane(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Bind_Column_Result_Serial_Number_Start_From_1") - + " " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Bind_Column_Even_Selected_(2,4,6...)")), FlowLayout.LEFT); + + " " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Bind_Column_Even_Selected_(2,4,6...)")), BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT); JPanel specifyPane = GUICoreUtils.createFlowPane(new JComponent[]{ serialTextField, new UILabel( com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_DSColumn_Result_Group_Format", "1,2-3,5,8", "$__count__") @@ -404,7 +405,7 @@ public class DSColumnAdvancedPane extends BasicPane { UIButton bottomFrmulaButton = new UIButton("..."); this.add(bottomFrmulaButton); - bottomFrmulaButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula") + "..."); + bottomFrmulaButton.setToolTipText(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula"), "...")); bottomFrmulaButton.setPreferredSize(new Dimension(25, formulaTextField.getPreferredSize().height)); bottomFrmulaButton.addActionListener(formulaButtonActionListener); } @@ -467,7 +468,7 @@ public class DSColumnAdvancedPane extends BasicPane { public ValuePane() { this.setLayout(FRGUIPaneFactory.createBoxFlowLayout()); - this.add(new UILabel(InsetText + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Value") + ":")); + this.add(new UILabel(BidiUtils.reverseConcatenateStrings(InsetText, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Value"), ":"))); this.add(Box.createHorizontalStrut(2)); this.add((formulaField = new JFormulaField("$$$"))); } diff --git a/designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnConditionsPane.java b/designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnConditionsPane.java index 4d6a1e62ac..68ff6a381e 100644 --- a/designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnConditionsPane.java +++ b/designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnConditionsPane.java @@ -1,5 +1,6 @@ package com.fr.design.dscolumn; +import com.fr.base.i18n.BidiUtils; import com.fr.data.TableDataSource; import com.fr.design.condition.DSColumnLiteConditionPane; import com.fr.design.condition.DSColumnSimpleLiteConditionPane; @@ -53,8 +54,8 @@ public class DSColumnConditionsPane extends BasicPane { reselectExpandCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Bind_Column_Extend_The_Conditions_of_Father_Cell(Applied_To_The_Data_Contains_Other_Data)"), false); pane.add(reselectExpandCheckBox); reselectExpandCheckBox.setSelected(true); - - JPanel reSelectPane = GUICoreUtils.createFlowPane(pane, FlowLayout.LEFT); + BidiUtils.setOrientationByLocale(reselectExpandCheckBox); + JPanel reSelectPane = GUICoreUtils.createFlowPane(pane, BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT); this.add(reSelectPane, BorderLayout.NORTH); reSelectPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Bind_Column_The_Conditions_Of_Father_Cell"), null)); } diff --git a/designer-realize/src/main/java/com/fr/design/dscolumn/ResultSetGroupPopUpPane.java b/designer-realize/src/main/java/com/fr/design/dscolumn/ResultSetGroupPopUpPane.java index a37dcf01e2..0823642197 100644 --- a/designer-realize/src/main/java/com/fr/design/dscolumn/ResultSetGroupPopUpPane.java +++ b/designer-realize/src/main/java/com/fr/design/dscolumn/ResultSetGroupPopUpPane.java @@ -1,5 +1,6 @@ package com.fr.design.dscolumn; +import com.fr.base.i18n.BidiUtils; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.ilable.UILabel; @@ -57,20 +58,20 @@ public class ResultSetGroupPopUpPane extends ResultSetGroupPane { advancedButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom")); advancedButton.addActionListener(groupAdvancedListener); this.add(GUICoreUtils.createFlowPane( - new JComponent[]{new UILabel(InsertText), groupRadioButton, groupComboBox, advancedButton}, FlowLayout.LEFT)); + new JComponent[]{new UILabel(InsertText), groupRadioButton, groupComboBox, advancedButton}, BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT)); // 列表 listRadioButton = new UIRadioButton(Toolkit.i18nText("Fine-Design_Report_Bind_Column_Select(Regardless_of_Having_the_Same_Value,Display_All_Item_in_Column)")); listRadioButton.addActionListener(checkEnabledActionListener); this.add(GUICoreUtils.createFlowPane( - new JComponent[]{new UILabel(InsertText), listRadioButton}, FlowLayout.LEFT)); + new JComponent[]{new UILabel(InsertText), listRadioButton}, BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT)); // 汇总 summaryRadioButton = new UIRadioButton(Toolkit.i18nText("Fine-Design_Report_Bind_Column_Summary(Including_SUM_,_AVERAGE_,_MAX_,_MIN_And_So_On)"), true); summaryRadioButton.addActionListener(checkEnabledActionListener); functionComboBox = new FunctionComboBox(GUICoreUtils.getFunctionArray()); this.add(GUICoreUtils.createFlowPane( - new JComponent[]{new UILabel(InsertText), summaryRadioButton, functionComboBox}, FlowLayout.LEFT)); + new JComponent[]{new UILabel(InsertText), summaryRadioButton, functionComboBox}, BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT)); ButtonGroup resultSetGroupButtonGroup = new ButtonGroup(); diff --git a/designer-realize/src/main/java/com/fr/design/dscolumn/SelectedDataColumnPane.java b/designer-realize/src/main/java/com/fr/design/dscolumn/SelectedDataColumnPane.java index 052fba9046..80550a421e 100644 --- a/designer-realize/src/main/java/com/fr/design/dscolumn/SelectedDataColumnPane.java +++ b/designer-realize/src/main/java/com/fr/design/dscolumn/SelectedDataColumnPane.java @@ -1,6 +1,7 @@ package com.fr.design.dscolumn; import com.fr.base.Parameter; +import com.fr.base.i18n.BidiUtils; import com.fr.data.SimpleDSColumn; import com.fr.data.TableDataSource; import com.fr.design.data.DesignTableDataManager; @@ -154,8 +155,8 @@ public class SelectedDataColumnPane extends BasicPane { }; columnNameComboBox.setEditable(true); double p = TableLayout.PREFERRED; - UILabel dsLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_TableData") + ":"); - UILabel dcLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Data_Column") + ":"); + UILabel dsLabel = new UILabel(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_TableData"), ":")); + UILabel dcLabel = new UILabel(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Data_Column"), ":")); if (showParameterButton) { dsLabel.setPreferredSize(new Dimension(200, 25)); dcLabel.setPreferredSize(new Dimension(200, 25)); diff --git a/designer-realize/src/main/java/com/fr/design/expand/ConditionParentPane.java b/designer-realize/src/main/java/com/fr/design/expand/ConditionParentPane.java index 579a8efbcf..749a90b765 100644 --- a/designer-realize/src/main/java/com/fr/design/expand/ConditionParentPane.java +++ b/designer-realize/src/main/java/com/fr/design/expand/ConditionParentPane.java @@ -5,6 +5,8 @@ import java.awt.FlowLayout; import java.awt.event.ActionListener; import javax.swing.JComponent; + +import com.fr.base.i18n.BidiUtils; import com.fr.design.gui.ilable.UILabel; import javax.swing.JPanel; @@ -37,13 +39,13 @@ public class ConditionParentPane extends JPanel { innerthis.add(eastPane); eastPane.add(GUICoreUtils.createFlowPane(new JComponent[] { - new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Left_Parent") + ": "), - leftParentPane = new ParentPane(ParentPane.LEFT, listener) }, FlowLayout.LEFT)); + new UILabel(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Left_Parent"), ": ")), + leftParentPane = new ParentPane(ParentPane.LEFT, listener) }, BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT)); eastPane.add(GUICoreUtils.createFlowPane( new JComponent[] { - new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Up_Parent") + ": "), - upParentPane = new ParentPane(ParentPane.UP, listener) }, FlowLayout.LEFT)); + new UILabel(BidiUtils.reverseConcatenateStrings(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Up_Parent"), ": ")), + upParentPane = new ParentPane(ParentPane.UP, listener) }, BidiUtils.rtl() ? FlowLayout.RIGHT : FlowLayout.LEFT)); } public void putElementcase(ElementCasePane t){ leftParentPane.putElementcase(t);