From 105fac05d51135c8c866a7fb1481b15f2777613b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Fri, 24 Dec 2021 17:48:06 +0800 Subject: [PATCH] =?UTF-8?q?CHART-22465=20=E6=8F=90=E7=A4=BA=E9=A2=9C?= =?UTF-8?q?=E8=89=B2=E4=B8=8D=E9=9C=80=E8=A6=81=E6=96=B0=E5=A2=9E=E8=87=AA?= =?UTF-8?q?=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/VanChartLabelContentPane.java | 17 ++++++++++ .../component/VanChartTooltipContentPane.java | 32 ++++++++++--------- 2 files changed, 34 insertions(+), 15 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLabelContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLabelContentPane.java index 06c064081..1aaf53424 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLabelContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLabelContentPane.java @@ -1,13 +1,17 @@ package com.fr.van.chart.designer.component; +import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; +import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPaneWithAuto; import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPaneWithThemeStyle; import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.plugin.chart.base.AttrTooltipContent; +import com.fr.plugin.chart.type.FontAutoType; import com.fr.plugin.chart.type.TextAlign; import com.fr.van.chart.designer.style.VanChartStylePane; import javax.swing.JPanel; import java.awt.BorderLayout; +import java.awt.Component; public class VanChartLabelContentPane extends VanChartTooltipContentPane { @@ -37,6 +41,19 @@ public class VanChartLabelContentPane extends VanChartTooltipContentPane { return stylePanel; } + @Override + protected ChartTextAttrPane createChartTextAttrPane() { + return new ChartTextAttrPaneWithAuto(FontAutoType.COLOR) { + protected Component[][] getComponents(JPanel buttonPane) { + return new Component[][]{ + new Component[]{null, null}, + new Component[]{null, getFontNameComboBox()}, + new Component[]{null, buttonPane} + }; + } + }; + } + public void updateTextAttr(AttrTooltipContent attrTooltipContent) { if (isInCondition() || !ChartEditContext.supportTheme()) { super.updateTextAttr(attrTooltipContent); 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 bdbdee6a8..ab84b88b8 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 @@ -11,7 +11,6 @@ import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; -import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPaneWithAuto; import com.fr.design.ui.ModernUIPane; import com.fr.general.ComparatorUtils; import com.fr.plugin.chart.base.AttrTooltipContent; @@ -22,7 +21,6 @@ import com.fr.plugin.chart.base.format.AttrTooltipFormat; import com.fr.plugin.chart.base.format.AttrTooltipPercentFormat; import com.fr.plugin.chart.base.format.AttrTooltipSeriesFormat; import com.fr.plugin.chart.base.format.AttrTooltipValueFormat; -import com.fr.plugin.chart.type.FontAutoType; import com.fr.stable.StringUtils; import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithCheckBox; @@ -41,10 +39,6 @@ import com.fr.van.chart.designer.style.VanChartStylePane; import javax.swing.JComponent; import javax.swing.JPanel; import javax.swing.SwingUtilities; -import java.util.Arrays; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; import java.awt.BorderLayout; import java.awt.CardLayout; import java.awt.Component; @@ -53,6 +47,10 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; /** * 数据点提示内容界面,含有通用设置、富文本编辑器、自定义JS界面 @@ -317,15 +315,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane