From 022ae69f07bb6f0280f167c77279a61dcb210145 Mon Sep 17 00:00:00 2001 From: Starryi Date: Thu, 21 Oct 2021 18:08:25 +0800 Subject: [PATCH] =?UTF-8?q?CHART-21593=20=E3=80=90=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E3=80=91=E7=94=9F=E6=88=90=E8=B7=9F=E9=9A=8F?= =?UTF-8?q?=E4=B8=BB=E9=A2=98=E7=9A=84=E7=BB=84=E4=BB=B6=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E6=8B=96=E5=88=B0=E5=85=B6=E4=BB=96=E4=B8=BB=E9=A2=98=E7=9A=84?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E4=B8=AD=EF=BC=8C=E5=9B=BE=E8=A1=A8=E8=BF=98?= =?UTF-8?q?=E6=98=AF=E8=B7=9F=E9=9A=8F=E4=B8=BB=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 处理新添加组件中的图表主题样式 【改动思路】 同上 --- .../com/fr/design/designer/creator/XCreatorUtils.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java b/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java index 408723152..30f9ab307 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XCreatorUtils.java @@ -3,6 +3,7 @@ */ package com.fr.design.designer.creator; +import com.fr.base.chart.BaseChartCollection; import com.fr.base.theme.FineColorFlushUtils; import com.fr.base.theme.FineColorGather; import com.fr.base.theme.FineColorManager; @@ -86,6 +87,7 @@ import org.jetbrains.annotations.Nullable; import javax.swing.Icon; import java.awt.Container; import java.awt.Dimension; +import java.util.List; /** * XCreator的相关处理 @@ -384,7 +386,12 @@ public class XCreatorUtils { public static void setupTemplateTheme(XCreator container, final boolean forceFollowingTheme, final FormTheme currentTemplateUsingTheme, TemplateThemeCompatible compatible) { FineColorGather colorGather = new FineColorManager.FineColorReplaceByTheme(currentTemplateUsingTheme, compatible); - Form.traversalWidget(container.toData(), new WidgetGather() { + Widget root = container.toData(); + List chartCollections = root.getChartCollections(); + for (BaseChartCollection chartCollection: chartCollections) { + chartCollection.onTemplateUsingThemeChange(currentTemplateUsingTheme, compatible); + } + Form.traversalWidget(root, new WidgetGather() { @Override public void dealWith(Widget widget) { TemplateThemeAware themedWidget = (TemplateThemeAware) widget;