From 4c3e72d82d32bbd68b3aeb129776040cab3ac683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Tue, 29 Dec 2020 17:06:51 +0800 Subject: [PATCH] =?UTF-8?q?CHART-17357=20=E7=BB=84=E5=90=88=E5=9B=BE?= =?UTF-8?q?=E5=8F=AA=E6=9C=89=E4=B8=80=E4=B8=AA=E5=9B=BE=E5=BD=A2=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E7=95=99=E7=99=BD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../van/chart/custom/VanChartCustomDataPane.java | 7 +++++++ .../VanChartCustomPlotDataContentsTabPane.java | 16 ++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomDataPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomDataPane.java index ec15e4cf98..47e6488fd6 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomDataPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomDataPane.java @@ -6,6 +6,7 @@ import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.plugin.chart.custom.VanChartCustomPlot; +import javax.swing.BorderFactory; import javax.swing.JPanel; import java.awt.BorderLayout; @@ -19,6 +20,12 @@ public class VanChartCustomDataPane extends ChartDataPane { super(listener); } + protected void initContentPane() { + leftContentPane = createContentPane(); + leftContentPane.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 0, original)); + this.add(leftContentPane, BorderLayout.CENTER); + } + @Override protected JPanel createContentPane() { JPanel content = new JPanel(new BorderLayout()); diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotDataContentsTabPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotDataContentsTabPane.java index 6d7d24bf96..30d23c1873 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotDataContentsTabPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotDataContentsTabPane.java @@ -12,11 +12,13 @@ import com.fr.plugin.chart.custom.type.CustomPlotType; import com.fr.van.chart.custom.component.VanChartCustomPlotTabPane; import com.fr.van.chart.custom.component.VanChartDataPane; +import javax.swing.BorderFactory; import javax.swing.JPanel; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.awt.BorderLayout; /** * Created by Fangjie on 2016/4/29. @@ -37,6 +39,20 @@ public class VanChartCustomPlotDataContentsTabPane extends VanChartCustomPlotTab this.supportCellData = supportCellData; } + @Override + protected void initLayout() { + JPanel tabPanel = new JPanel(new BorderLayout()); + if (NameArray.length > 1) { + tabPanel.setBorder(BorderFactory.createMatteBorder(10, 0, 0, 0, getBackground())); + } else { + tabPanel.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 0, getBackground())); + } + tabPanel.add(tabPane, BorderLayout.CENTER); + this.setLayout(new BorderLayout(0, 0)); + this.add(tabPanel, BorderLayout.NORTH); + this.add(centerPane, BorderLayout.CENTER); + } + @Override protected void initTabTitle() {