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()