From 7dd74a7ef928c4ac2c0b354117514f84f04872b2 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Wed, 19 Aug 2020 17:48:12 +0800 Subject: [PATCH 1/2] =?UTF-8?q?CHART-15175=20=E8=B0=83=E6=95=B4=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E6=95=B0=E6=8D=AE=E7=9A=84=E6=95=B0=E6=8D=AE=E7=82=B9?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/van/chart/box/VanChartBoxPlotTooltipPane.java | 4 ---- .../com/fr/van/chart/box/VanChartBoxTooltipContentPane.java | 6 +++++- .../java/com/fr/van/chart/box/VanChartBoxTooltipPane.java | 6 ------ .../chart/box/data/report/BoxPlotReportDataContentPane.java | 2 +- .../chart/box/data/table/BoxPlotTableDataContentPane.java | 2 +- 5 files changed, 7 insertions(+), 13 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxPlotTooltipPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxPlotTooltipPane.java index a68eb5596..f1cae6e3b 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxPlotTooltipPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxPlotTooltipPane.java @@ -25,8 +25,4 @@ public class VanChartBoxPlotTooltipPane extends VanChartPlotTooltipPane { protected boolean hasTooltipSeriesType() { return false; } - - public void checkContentVisible(boolean isDetailed) { - ((VanChartBoxTooltipContentPane) tooltipContentPane).checkFormatVisible(isDetailed); - } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java index 8831b5049..b2271cc33 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java @@ -178,7 +178,7 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { } protected AttrTooltipContent createAttrTooltip() { - return new AttrBoxTooltipContent(); + return new AttrBoxTooltipContent(detailed); } protected void populateFormatPane(AttrTooltipContent attrTooltipContent) { @@ -195,6 +195,8 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { q1.populate(boxTooltipContent.getQ1()); min.populate(boxTooltipContent.getMin()); outlier.populate(boxTooltipContent.getOutlier()); + + checkFormatVisible(boxTooltipContent.isDetailed()); } } @@ -212,6 +214,8 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { q1.update(boxTooltipContent.getQ1()); min.update(boxTooltipContent.getMin()); outlier.update(boxTooltipContent.getOutlier()); + + boxTooltipContent.setDetailed(this.detailed); } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipPane.java index 955f97453..ad5840267 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipPane.java @@ -4,7 +4,6 @@ import com.fr.chart.base.DataSeriesCondition; import com.fr.chart.chartattr.Plot; import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.base.AttrTooltip; -import com.fr.plugin.chart.box.VanChartBoxPlot; import com.fr.van.chart.designer.style.VanChartStylePane; import com.fr.van.chart.designer.style.tooltip.VanChartPlotTooltipPane; import com.fr.van.chart.designer.style.tooltip.VanChartTooltipPane; @@ -25,11 +24,6 @@ public class VanChartBoxTooltipPane extends VanChartTooltipPane { if (tooltipPane instanceof VanChartBoxPlotTooltipPane) { tooltipPane.populate((AttrTooltip) attr); - - VanChartBoxPlotTooltipPane boxPlotTooltipPane = (VanChartBoxPlotTooltipPane) tooltipPane; - VanChartBoxPlot boxPlot = (VanChartBoxPlot) plot; - - boxPlotTooltipPane.checkContentVisible(boxPlot.isDetailed()); } } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/data/report/BoxPlotReportDataContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/data/report/BoxPlotReportDataContentPane.java index f6d609035..037c0aa70 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/data/report/BoxPlotReportDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/data/report/BoxPlotReportDataContentPane.java @@ -101,7 +101,7 @@ public class BoxPlotReportDataContentPane extends AbstractReportDataContentPane boolean isDetailed = dataType.getSelectedIndex() == 0; report.setDetailed(isDetailed); - ((VanChartBoxPlot) initplot).setDetailed(isDetailed); + ((VanChartBoxPlot) initplot).updateDetailedAttr(isDetailed); } if (detailedDataSeriesPane != null) { detailedDataSeriesPane.updateBean(collection); diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableDataContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableDataContentPane.java index 92b554d0d..4fa2296aa 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableDataContentPane.java @@ -154,7 +154,7 @@ public class BoxPlotTableDataContentPane extends AbstractTableDataContentPane { boolean isDetailed = dataType.getSelectedIndex() == 0; table.setDetailed(isDetailed); - ((VanChartBoxPlot) initplot).setDetailed(isDetailed); + ((VanChartBoxPlot) initplot).updateDetailedAttr(isDetailed); } if (seriesTypeComboxPane != null) { seriesTypeComboxPane.updateBean(collection); From b42d4cc480c431184c0746bdf69bded08f911300 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Wed, 19 Aug 2020 18:20:06 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=B0=83=E6=95=B4check=E7=9A=84=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/van/chart/box/VanChartBoxTooltipContentPane.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java index b2271cc33..77b16b499 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java @@ -32,7 +32,7 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { public VanChartBoxTooltipContentPane(VanChartStylePane parent, JPanel showOnPane, boolean isDetailed) { super(parent, showOnPane); - this.detailed = isDetailed; + checkFormatVisible(isDetailed); } protected void initFormatPane(VanChartStylePane parent, JPanel showOnPane) { @@ -83,8 +83,6 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { commonPanel.add(createDataNumberPane(), BorderLayout.CENTER); commonPanel.add(createDataDetailPane(), BorderLayout.SOUTH); - checkFormatVisible(detailed); - return commonPanel; }