From 3d08f416a315c569425b56da9f6d46766c8650e9 Mon Sep 17 00:00:00 2001 From: Carlson Date: Wed, 9 Aug 2023 14:04:02 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-102520=20fix:=E9=9D=A2=E6=9D=BF=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/gui/data/NormalChartDataPane.java | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java index ba1701710e..f8f43d232a 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java @@ -2,6 +2,7 @@ package com.fr.design.mainframe.chart.gui.data; import com.fr.chart.chartattr.ChartCollection; import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.chartx.data.DataLayoutHelper; import com.fr.design.constants.LayoutConstants; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.UIComboBoxPane; @@ -61,15 +62,22 @@ public class NormalChartDataPane extends DataContentsPane { JPanel contentPane = new JPanel(new BorderLayout()); dataPane = new UIComboBoxPane() { protected void initLayout() { - this.setLayout(new BorderLayout(LayoutConstants.HGAP_LARGE,6)); - JPanel northPane = new JPanel(new BorderLayout(LayoutConstants.HGAP_LARGE,0)); - northPane.add(jcb, BorderLayout.CENTER); - UILabel label1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Source")); - label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT)); - northPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{jcb, null, null, label1, null})); - northPane.setBorder(BorderFactory.createEmptyBorder(0,5,0,8)); if (ChartEditContext.supportReportData()) { - this.add(northPane, BorderLayout.NORTH); + if (ChartEditContext.normalMode()) { + this.setLayout(new BorderLayout(LayoutConstants.HGAP_LARGE,6)); + JPanel northPane = new JPanel(new BorderLayout(LayoutConstants.HGAP_LARGE,0)); + northPane.add(jcb, BorderLayout.CENTER); + UILabel label1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Source")); + label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT)); + northPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{jcb, null, null, label1, null})); + northPane.setBorder(BorderFactory.createEmptyBorder(0,5,0,8)); + this.add(northPane, BorderLayout.NORTH); + } else { + this.setLayout(new BorderLayout(0, 6)); + JPanel northPane = DataLayoutHelper.createDataLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Source"), jcb); + northPane.setBorder(BorderFactory.createEmptyBorder(0, DataLayoutHelper.LEFT_GAP, 0, DataLayoutHelper.RIGHT_GAP)); + this.add(northPane, BorderLayout.NORTH); + } } this.add(cardPane, BorderLayout.CENTER);