From 3961ddfd9f9808c4cfe0c2b68f4a64e0fb770a8a Mon Sep 17 00:00:00 2001 From: obo Date: Wed, 7 Aug 2024 16:14:47 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84FRLeftFlowLayout=E3=80=81Tree?= =?UTF-8?q?RootPane?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/itree/refreshabletree/TreeRootPane.java | 11 ++++------- .../java/com/fr/design/layout/FRLeftFlowLayout.java | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/itree/refreshabletree/TreeRootPane.java b/designer-base/src/main/java/com/fr/design/gui/itree/refreshabletree/TreeRootPane.java index 96a2be2122..691749fac6 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itree/refreshabletree/TreeRootPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/itree/refreshabletree/TreeRootPane.java @@ -1,16 +1,13 @@ package com.fr.design.gui.itree.refreshabletree; -import com.fr.base.i18n.BidiUtils; import com.fr.data.impl.TreeAttr; import com.fr.design.dialog.BasicPane; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.layout.FRGUIPaneFactory; -import groovy.swing.factory.LayoutFactory; import javax.swing.BorderFactory; import javax.swing.BoxLayout; import javax.swing.JPanel; -import java.awt.FlowLayout; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.util.ArrayList; @@ -35,7 +32,7 @@ public class TreeRootPane extends BasicPane { public TreeRootPane() { this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); - JPanel checkTypePane = BidiUtils.rtl() ? FRGUIPaneFactory.createTrailingFlowInnerContainer_S_Pane() : FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0(); + JPanel checkTypePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0(); checkTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); checkTypeCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Mutiple_Selection_Or_Not")); checkTypeCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); @@ -43,7 +40,7 @@ public class TreeRootPane extends BasicPane { checkTypePane.add(checkTypeCheckBox); this.add(checkTypePane); - JPanel loadTypePane = BidiUtils.rtl() ? FRGUIPaneFactory.createTrailingFlowInnerContainer_S_Pane() : FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0(); + JPanel loadTypePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0(); checkTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); loadTypeCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Load_By_Async")); loadTypeCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); @@ -51,14 +48,14 @@ public class TreeRootPane extends BasicPane { loadTypePane.add(loadTypeCheckBox); this.add(loadTypePane); - JPanel leafSelectPane = BidiUtils.rtl() ? FRGUIPaneFactory.createTrailingFlowInnerContainer_S_Pane() : FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0(); + JPanel leafSelectPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0(); checkTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); leafSelectPane.add(layerTypeCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Select_Leaf_Only"))); layerTypeCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); this.add(leafSelectPane); - JPanel returnFullPathPane = BidiUtils.rtl() ? FRGUIPaneFactory.createTrailingFlowInnerContainer_S_Pane() : FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0(); + JPanel returnFullPathPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0(); checkTypePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); returnFullPathPane.add(returnFullPathCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Return_Full_Path"))); returnFullPathCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); diff --git a/designer-base/src/main/java/com/fr/design/layout/FRLeftFlowLayout.java b/designer-base/src/main/java/com/fr/design/layout/FRLeftFlowLayout.java index 23003eeff3..bb530b4fcf 100644 --- a/designer-base/src/main/java/com/fr/design/layout/FRLeftFlowLayout.java +++ b/designer-base/src/main/java/com/fr/design/layout/FRLeftFlowLayout.java @@ -18,7 +18,7 @@ public class FRLeftFlowLayout extends FlowLayout { public void layoutContainer(Container target) { synchronized (target.getTreeLock()) { Insets insets = target.getInsets(); - int maxwidth = target.getWidth() - (insets.left + insets.right + getHgap()*2); + int maxwidth = target.getPreferredSize().width - (insets.left + insets.right + getHgap()*2); int nmembers = target.getComponentCount(); int x = 0, y = insets.top + getVgap(); int rowh = 0, start = 0;