diff --git a/designer-base/src/main/java/com/fr/design/hyperlink/popup/ContentSettingPane.java b/designer-base/src/main/java/com/fr/design/hyperlink/popup/ContentSettingPane.java index 848ac9e57c..bd7bf3b548 100644 --- a/designer-base/src/main/java/com/fr/design/hyperlink/popup/ContentSettingPane.java +++ b/designer-base/src/main/java/com/fr/design/hyperlink/popup/ContentSettingPane.java @@ -3,6 +3,7 @@ package com.fr.design.hyperlink.popup; import com.fr.base.BaseFormula; import com.fr.base.BaseUtils; import com.fr.base.Parameter; +import com.fr.base.i18n.BidiUtils; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.formula.TinyFormulaPane; @@ -73,6 +74,7 @@ public class ContentSettingPane extends AbstractHyperLinkPane { this.add(typePane, BorderLayout.NORTH); stylePane = this.createStylePane(); this.add(stylePane, BorderLayout.CENTER); + BidiUtils.applyOrientationByLocale(this); } private JPanel createTypePane() { JPanel typePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); popupTypeLabel = new UILabel(""); - typePane.add(popupTypeLabel, BorderLayout.CENTER); + typePane.add(popupTypeLabel, BidiUtils.rtl() ? BorderLayout.EAST : BorderLayout.CENTER); return MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Type"), typePane); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/widget/UITitleSplitLine.java b/designer-base/src/main/java/com/fr/design/mainframe/widget/UITitleSplitLine.java index f7e2779a4e..c2e5b5728f 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/widget/UITitleSplitLine.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/widget/UITitleSplitLine.java @@ -1,7 +1,9 @@ package com.fr.design.mainframe.widget; +import com.fr.base.i18n.BidiUtils; import com.fr.design.gui.ilable.UILabel; import com.fr.general.FRFont; + import javax.swing.JPanel; import java.awt.Color; import java.awt.Dimension; @@ -35,14 +37,25 @@ public class UITitleSplitLine extends JPanel { Dimension size = label.getPreferredSize(); int labelH = size.height; g.setColor(color); - g.drawLine(0, labelH / 2, OFFSETX, labelH / 2); - g.drawLine(OFFSETX + size.width + OFFSET * 2, labelH / 2, width, labelH / 2); - g.translate(OFFSETX + OFFSET, 0); - label.setFont(TITLE_FONT); - label.setForeground(TITLE_COLOR); - label.setSize(size.width, size.height); - label.paint(g); - g.translate(-OFFSETX - OFFSET, 0); + if (BidiUtils.rtl()) { + g.drawLine(0, labelH / 2, width - OFFSETX - size.width - OFFSET * 2, labelH / 2); + g.drawLine(width - OFFSETX, labelH / 2, width, labelH / 2); + g.translate(width - OFFSETX - size.width - OFFSET, 0); + label.setFont(TITLE_FONT); + label.setForeground(TITLE_COLOR); + label.setSize(size.width, size.height); + label.paint(g); + g.translate(-width + OFFSETX + size.width + OFFSET, 0); + } else { + g.drawLine(0, labelH / 2, OFFSETX, labelH / 2); + g.drawLine(OFFSETX + size.width + OFFSET * 2, labelH / 2, width, labelH / 2); + g.translate(OFFSETX + OFFSET, 0); + label.setFont(TITLE_FONT); + label.setForeground(TITLE_COLOR); + label.setSize(size.width, size.height); + label.paint(g); + g.translate(-OFFSETX - OFFSET, 0); + } }