From 8afcd3a2aab6ba2861db6dbe31d739110f28a374 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Mon, 23 Aug 2021 17:47:24 +0800 Subject: [PATCH] =?UTF-8?q?CHART-20117=20=E6=A0=87=E7=AD=BE=E5=AD=97?= =?UTF-8?q?=E4=BD=93=E5=85=BC=E5=AE=B9=EF=BC=8C=E5=8D=87=E7=BA=A7=E4=B8=8A?= =?UTF-8?q?=E6=9D=A5=E7=9A=84=E8=87=AA=E5=8A=A8=E6=98=BE=E7=A4=BA=E8=B7=9F?= =?UTF-8?q?=E9=9A=8F=E4=B8=BB=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/chart/gui/style/ChartTextAttrPane.java | 5 +++++ .../chart/gui/style/ChartTextAttrPaneWithThemeStyle.java | 6 +++++- .../designer/component/VanChartTooltipContentPane.java | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java index 9a906cc7c..b23b63a18 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java @@ -35,6 +35,7 @@ public class ChartTextAttrPane extends BasicPane { private UIToggleButton italic; private UIColorButton fontColor; public static Integer[] FONT_SIZES = new Integer[FONT_END - FONT_START + 1]; + static { for (int i = FONT_START; i <= FONT_END; i++) { FONT_SIZES[i - FONT_START] = i; @@ -88,6 +89,10 @@ public class ChartTextAttrPane extends BasicPane { populate(frFont); } + public void populate(TextAttr textAttr, boolean autoFont) { + populate(textAttr); + } + public void update(TextAttr textAttr) { if (textAttr == null) { textAttr = new TextAttr(); diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPaneWithThemeStyle.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPaneWithThemeStyle.java index 37515e151..345d57de8 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPaneWithThemeStyle.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPaneWithThemeStyle.java @@ -80,7 +80,11 @@ public class ChartTextAttrPaneWithThemeStyle extends ChartTextAttrPane { } public void populate(TextAttr textAttr) { - if (textAttr.isThemed()) { + populate(textAttr, false); + } + + public void populate(TextAttr textAttr, boolean autoFont) { + if (textAttr.isThemed() || autoFont) { preButton.setSelectedIndex(PREDEFINED_STYLE); } else { preButton.setSelectedIndex(CUSTOM); 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 d7c590e64..12e242b73 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 @@ -632,7 +632,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane