From 0daf4bd41820013bcd59ae5dd9e8545e377caa76 Mon Sep 17 00:00:00 2001 From: obo Date: Mon, 5 Aug 2024 17:04:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6-=E5=88=87=E6=8D=A2=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E7=9B=AE=E5=BD=95-=E5=85=B6=E4=BB=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/gui/itree/UITreeUI.java | 3 ++- designer-base/src/main/java/com/fr/env/LocalEnvPane.java | 4 +++- designer-base/src/main/java/com/fr/env/RemoteEnvPane.java | 2 ++ .../main/resources/com/fr/design/standard/fileicon/left.svg | 3 +++ 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 designer-base/src/main/resources/com/fr/design/standard/fileicon/left.svg diff --git a/designer-base/src/main/java/com/fr/design/gui/itree/UITreeUI.java b/designer-base/src/main/java/com/fr/design/gui/itree/UITreeUI.java index a4d66c4384..6cfab31338 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itree/UITreeUI.java +++ b/designer-base/src/main/java/com/fr/design/gui/itree/UITreeUI.java @@ -1,6 +1,7 @@ package com.fr.design.gui.itree; import com.fr.base.BaseUtils; +import com.fr.base.i18n.BidiUtils; import com.fr.base.svg.IconUtils; import com.fr.design.utils.ThemeUtils; @@ -29,7 +30,7 @@ public class UITreeUI extends MetalTreeUI { protected void installDefaults() { super.installDefaults(); setExpandedIcon(IconUtils.readIcon("/com/fr/design/standard/fileicon/minus.svg")); - setCollapsedIcon(IconUtils.readIcon("/com/fr/design/standard/fileicon/plus.svg")); + setCollapsedIcon(BidiUtils.rtl() ? IconUtils.readIcon("/com/fr/design/standard/fileicon/left.svg") : IconUtils.readIcon("/com/fr/design/standard/fileicon/plus.svg")); if (tree.getCellRenderer() instanceof DefaultTreeCellRenderer) { DefaultTreeCellRenderer r = (DefaultTreeCellRenderer) tree.getCellRenderer(); r.setBackgroundNonSelectionColor(ThemeUtils.TEXT_BG_COLOR); diff --git a/designer-base/src/main/java/com/fr/env/LocalEnvPane.java b/designer-base/src/main/java/com/fr/env/LocalEnvPane.java index 6f191dd1ec..d571811233 100644 --- a/designer-base/src/main/java/com/fr/env/LocalEnvPane.java +++ b/designer-base/src/main/java/com/fr/env/LocalEnvPane.java @@ -1,5 +1,6 @@ package com.fr.env; +import com.fr.base.i18n.BidiUtils; import com.fr.design.beans.BasicBeanPane; import com.fr.design.env.LocalDesignerWorkspaceInfo; import com.fr.design.gui.ilable.UILabel; @@ -33,7 +34,7 @@ public class LocalEnvPane extends BasicBeanPane { JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); this.add(northPane, BorderLayout.NORTH); - northPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Location") + ":"), BorderLayout.WEST); + northPane.add(new UILabel(BidiUtils.reverseConcatenateStrings(Toolkit.i18nText("Fine-Design_Basic_Location"), ":")), BidiUtils.rtl() ? BorderLayout.EAST : BorderLayout.WEST); pathTextField = new UITextField(); northPane.add(pathTextField, BorderLayout.CENTER); @@ -67,6 +68,7 @@ public class LocalEnvPane extends BasicBeanPane { centerPane.add(description, BorderLayout.SOUTH); description.setText(Toolkit.i18nText("Fine-Design_Basic_Env_Des1")); description.setEditable(false); + BidiUtils.applyOrientationByLocale(this); } @Override diff --git a/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java b/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java index 7be733b2b5..65a0c97a13 100644 --- a/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java +++ b/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java @@ -1,5 +1,6 @@ package com.fr.env; +import com.fr.base.i18n.BidiUtils; import com.fr.design.DesignerEnvManager; import com.fr.design.ExtraDesignClassManager; import com.fr.design.beans.BasicBeanPane; @@ -317,6 +318,7 @@ public class RemoteEnvPane extends BasicBeanPane { UIScrollPane scrollPane = new UIScrollPane(panel); this.setLayout(new BorderLayout()); this.add(scrollPane); + BidiUtils.applyOrientationByLocale(this); } @Override diff --git a/designer-base/src/main/resources/com/fr/design/standard/fileicon/left.svg b/designer-base/src/main/resources/com/fr/design/standard/fileicon/left.svg new file mode 100644 index 0000000000..4d7d391962 --- /dev/null +++ b/designer-base/src/main/resources/com/fr/design/standard/fileicon/left.svg @@ -0,0 +1,3 @@ + + +