From 5fddc50cf8f12db3f44fa83db093dee462c75f47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Wed, 15 Apr 2020 09:06:29 +0800 Subject: [PATCH] =?UTF-8?q?CHART-13481=20=E5=A4=A7=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E4=B8=8B=E7=9A=84=E9=AB=98=E4=BA=AE=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../van/chart/designer/style/VanChartLegendPane.java | 1 + .../chart/designer/style/VanChartPlotLegendPane.java | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartLegendPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartLegendPane.java index facef9208..8fb3aed22 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartLegendPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartLegendPane.java @@ -68,6 +68,7 @@ public class VanChartLegendPane extends AbstractVanChartScrollPane { if (plot == null) { return; } + legendContent.setPlot(plot); VanChartLegend legend = (VanChartLegend) plot.getLegend(); if (legendContent != null) { legendContent.populateBean(legend); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java index 5a9d8ebda..4ab88f616 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java @@ -2,14 +2,15 @@ package com.fr.van.chart.designer.style; import com.fr.base.BaseUtils; import com.fr.base.Style; +import com.fr.chart.chartattr.Plot; import com.fr.design.dialog.BasicPane; import com.fr.design.gui.frpane.UIBubbleFloatPane; import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.i18n.Toolkit; import com.fr.design.gui.ispinner.UISpinner; +import com.fr.design.i18n.Toolkit; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.PaneTitleConstants; @@ -18,6 +19,7 @@ import com.fr.design.utils.gui.UIComponentUtils; import com.fr.plugin.chart.attr.VanChartLegend; import com.fr.plugin.chart.type.LayoutType; import com.fr.stable.Constants; +import com.fr.van.chart.designer.PlotFactory; import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.component.VanChartFloatPositionPane; import com.fr.van.chart.designer.component.background.VanChartBackgroundWithOutImagePane; @@ -46,6 +48,8 @@ public class VanChartPlotLegendPane extends BasicPane { private static final int HEIGHT = 100; private static final int GAP = 20; + private Plot plot; + private UICheckBox isLegendVisible; private JPanel legendPane; @@ -80,6 +84,10 @@ public class VanChartPlotLegendPane extends BasicPane { initComponents(); } + public void setPlot(Plot plot) { + this.plot = plot; + } + public JPanel getHighlightPane() { return highlightPane; } @@ -421,6 +429,7 @@ public class VanChartPlotLegendPane extends BasicPane { //limitPane.populateBean(legend.getLimitAttribute()); if(highlightButton != null){ highlightButton.setSelectedItem(legend.isHighlight()); + highlightButton.setEnabled(!PlotFactory.largeDataModel(plot)); } }