From f36cf8c00faa4c312b9960bac6e9a36b15d7d897 Mon Sep 17 00:00:00 2001 From: Zhanying <2446962908@qq.com> Date: Wed, 18 Sep 2024 15:44:26 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-134295=20fix:=20=E3=80=90FBP=E3=80=91?= =?UTF-8?q?=E6=89=A9=E5=B1=95=E5=9B=BE=E8=A1=A8=E6=95=B0=E6=8D=AE=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E5=B8=83=E5=B1=80=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/chartx/data/DataLayoutHelper.java | 12 ++---------- .../com/fr/design/chartx/single/CellDataPane.java | 2 -- .../com/fr/design/chartx/single/DataSetPane.java | 1 - .../com/fr/design/chartx/single/SingleDataPane.java | 1 - 4 files changed, 2 insertions(+), 14 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/chartx/data/DataLayoutHelper.java b/designer-chart/src/main/java/com/fr/design/chartx/data/DataLayoutHelper.java index 98ae28085c..9ac16b486b 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/data/DataLayoutHelper.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/data/DataLayoutHelper.java @@ -1,15 +1,13 @@ package com.fr.design.chartx.data; +import com.fine.theme.utils.FineLayoutBuilder; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; import javax.swing.BorderFactory; import javax.swing.JComponent; import javax.swing.JPanel; import javax.swing.SwingConstants; import java.awt.Component; -import java.util.Arrays; /** * @author shine @@ -46,13 +44,7 @@ public class DataLayoutHelper { } public static JPanel createDataLayoutPane(Component[][] components) { - int len = components.length; - double p = TableLayout.PREFERRED; - double[] columnSize = {DataLayoutHelper.LABEL_WIDTH, DataLayoutHelper.WIDTH}; - double[] rowSize = new double[len]; - Arrays.fill(rowSize, p); - - return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + return FineLayoutBuilder.compatibleTableLayout(10, components, new double[] {1.2, 3}); } public static JPanel createDataLayoutPane(String label, Component component) { diff --git a/designer-chart/src/main/java/com/fr/design/chartx/single/CellDataPane.java b/designer-chart/src/main/java/com/fr/design/chartx/single/CellDataPane.java index 37c45d0416..b4bb2672b0 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/single/CellDataPane.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/single/CellDataPane.java @@ -2,7 +2,6 @@ package com.fr.design.chartx.single; import com.fr.chartx.data.CellDataDefinition; import com.fr.design.beans.FurtherBasicBeanPane; -import com.fr.design.chartx.data.DataLayoutHelper; import com.fr.design.chartx.fields.AbstractCellDataFieldsPane; import com.fr.design.i18n.Toolkit; @@ -24,7 +23,6 @@ public class CellDataPane extends FurtherBasicBeanPane { this.setLayout(new BorderLayout()); this.add(cellDataFieldsPane, BorderLayout.CENTER); - DataLayoutHelper.addNormalBorder(this); } @Override diff --git a/designer-chart/src/main/java/com/fr/design/chartx/single/DataSetPane.java b/designer-chart/src/main/java/com/fr/design/chartx/single/DataSetPane.java index dab74e15a4..699784cc73 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/single/DataSetPane.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/single/DataSetPane.java @@ -48,7 +48,6 @@ public class DataSetPane extends FurtherBasicBeanPane { this.setLayout(new BorderLayout(0, 6)); this.add(northPane, BorderLayout.NORTH); this.add(dataSetFieldsPane, BorderLayout.CENTER); - DataLayoutHelper.addNormalBorder(this); checkBoxUse(); } diff --git a/designer-chart/src/main/java/com/fr/design/chartx/single/SingleDataPane.java b/designer-chart/src/main/java/com/fr/design/chartx/single/SingleDataPane.java index 06ed06649b..00873cadd1 100644 --- a/designer-chart/src/main/java/com/fr/design/chartx/single/SingleDataPane.java +++ b/designer-chart/src/main/java/com/fr/design/chartx/single/SingleDataPane.java @@ -46,7 +46,6 @@ public class SingleDataPane extends BasicBeanPane { protected void initLayout() { this.setLayout(new BorderLayout(0, 6)); JPanel northPane = DataLayoutHelper.createDataLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Data_Source"), jcb); - DataLayoutHelper.addNormalBorder(northPane); this.add(northPane, BorderLayout.NORTH); this.add(cardPane, BorderLayout.CENTER);