From dd32c9f7113090ba576499cf673f49885441e181 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Mon, 21 Sep 2020 10:26:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E7=94=98=E7=89=B9=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E5=92=8C=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/VanChartTooltipContentPane.java | 42 +++++++++++---- .../VanChartGanttTooltipContentPane.java | 54 +++++++++++++++++++ 2 files changed, 85 insertions(+), 11 deletions(-) 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 76148e6490..bf7b517943 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 @@ -190,6 +190,10 @@ public class VanChartTooltipContentPane extends BasicBeanPane params = getRichTextAttr().getParams(); + + AttrTooltipProcessesFormat processesFormat = ganttTooltipContent.getRichTextProcessesFormat(); + richTextProcessesFormatPane.populate(processesFormat); + richTextProcessesFormatPane.updateFormatParams(params, processesFormat.getJs()); + + AttrTooltipSeriesFormat seriesFormat = ganttTooltipContent.getRichTextSeriesFormat(); + getRichTextSeriesNameFormatPane().populate(seriesFormat); + getRichTextSeriesNameFormatPane().updateFormatParams(params, seriesFormat.getJs()); + + AttrTooltipStartTimeFormat startTimeFormat = ganttTooltipContent.getRichTextStartTimeFormat(); + richTextStartTimeFormatPane.populate(startTimeFormat); + richTextStartTimeFormatPane.updateFormatParams(params, startTimeFormat.getJs()); + + AttrTooltipEndTimeFormat endTimeFormat = ganttTooltipContent.getRichTextEndTimeFormat(); + richTextEndTimeFormatPane.populate(endTimeFormat); + richTextEndTimeFormatPane.updateFormatParams(params, endTimeFormat.getJs()); + + AttrTooltipDurationFormat durationFormat = ganttTooltipContent.getRichTextDurationFormat(); + richTextDurationFormatPane.populate(durationFormat); + richTextDurationFormatPane.updateFormatParams(params, durationFormat.getJs()); + + AttrTooltipProgressFormat progressFormat = ganttTooltipContent.getRichTextProgressFormat(); + richTextProgressFormatPane.populate(progressFormat); + richTextProgressFormatPane.updateFormatParams(params, progressFormat.getJs()); + + populateRichText(attrTooltipContent.getRichTextAttr()); + } + } + protected void updateFormatPane(AttrTooltipContent attrTooltipContent) { if (attrTooltipContent instanceof AttrGanttTooltipContent){ AttrGanttTooltipContent ganttTooltipContent = (AttrGanttTooltipContent) attrTooltipContent; @@ -138,6 +179,19 @@ public class VanChartGanttTooltipContentPane extends VanChartTooltipContentPane } } + protected void updateRichEditor(AttrTooltipContent attrTooltipContent) { + if(attrTooltipContent instanceof AttrGanttTooltipContent) { + AttrGanttTooltipContent ganttTooltipContent = (AttrGanttTooltipContent) attrTooltipContent; + + richTextProcessesFormatPane.update(ganttTooltipContent.getRichTextProcessesFormat()); + getRichTextSeriesNameFormatPane().update(ganttTooltipContent.getRichTextSeriesFormat()); + richTextStartTimeFormatPane.update(ganttTooltipContent.getRichTextStartTimeFormat()); + richTextEndTimeFormatPane.update(ganttTooltipContent.getRichTextEndTimeFormat()); + richTextDurationFormatPane.update(ganttTooltipContent.getRichTextDurationFormat()); + richTextProgressFormatPane.update(ganttTooltipContent.getRichTextProgressFormat()); + } + } + public boolean isDirty() { return processesFormatPane.isDirty() || getSeriesNameFormatPane().isDirty()