From 060492c86021c3335a407d99a77dfa01b778bf10 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Sun, 18 Oct 2020 16:19:15 +0800 Subject: [PATCH] =?UTF-8?q?CHART-16224=20=E5=A2=9E=E5=8A=A0=E5=AF=8C?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E6=9D=A1=E4=BB=B6=E5=B1=9E=E6=80=A7=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../VanChartColumnPlotLabelDetailPane.java | 26 +++++++++++++++++++ .../component/VanChartTooltipContentPane.java | 14 ++++++---- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java index b2035522d..8de209712 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnPlotLabelDetailPane.java @@ -5,6 +5,8 @@ import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.plugin.chart.base.AttrLabelDetail; import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.plugin.chart.column.VanChartColumnPlot; +import com.fr.van.chart.designer.component.VanChartLabelContentPane; +import com.fr.van.chart.designer.component.VanChartTooltipContentPane; import com.fr.van.chart.designer.style.VanChartStylePane; import com.fr.van.chart.designer.style.label.VanChartPlotLabelDetailPane; @@ -14,6 +16,30 @@ public class VanChartColumnPlotLabelDetailPane extends VanChartPlotLabelDetailPa super(plot, parent); } + protected void initToolTipContentPane(Plot plot) { + VanChartLabelContentPane dataLabelContentPane = new VanChartLabelContentPane(getParentPane(), VanChartColumnPlotLabelDetailPane.this) { + protected void checkCardPane() { + super.checkCardPane(); + checkOrientationPane(); + } + }; + + setDataLabelContentPane(dataLabelContentPane); + } + + private void checkOrientationPane() { + VanChartLabelContentPane dataLabelContentPane = (VanChartLabelContentPane) getDataLabelContentPane(); + UIButtonGroup content = dataLabelContentPane.getContent(); + UIButtonGroup orientation = getOrientation(); + + if (content.getSelectedIndex() == VanChartTooltipContentPane.RICH_EDITOR_INDEX) { + orientation.setSelectedIndex(HORIZONTAL_INDEX); + orientation.setEnabled(false); + } else { + orientation.setEnabled(true); + } + } + protected boolean hasLabelOrientationPane() { return !((VanChartColumnPlot) this.getPlot()).isBar(); } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java index aca007097..d4ef4ac77 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java @@ -57,10 +57,10 @@ public class VanChartTooltipContentPane extends BasicBeanPane content; @@ -202,6 +202,10 @@ public class VanChartTooltipContentPane extends BasicBeanPane getContent() { + return content; + } + public AttrTooltipRichText getRichTextAttr() { return richText; } @@ -513,7 +517,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane