From 0c28b413e0945ca193e0a87d71825def65f1daff Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 15 Nov 2022 15:48:15 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-83483=20FVS=E5=86=85=E7=BD=AE?= =?UTF-8?q?=E7=B4=A0=E6=9D=90=E6=96=B0=E5=A2=9E=E5=95=86=E7=94=A8=E5=85=8D?= =?UTF-8?q?=E8=B4=B9=E5=AD=97=E4=BD=93=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/fun/DefaultValueAdjustProvider.java | 9 +++++++++ .../com/fr/design/gui/style/ComponentTitleStylePane.java | 3 ++- .../main/java/com/fr/design/gui/style/FRFontPane.java | 3 ++- .../ui/SidebarMobileBookMarkStyleCustomDefinePane.java | 5 +++-- .../fr/design/mainframe/mobile/utils/FontConfigPane.java | 3 ++- .../design/mainframe/theme/edit/chart/ChartFontPane.java | 3 ++- .../design/mainframe/widget/MobileTabFontConfPane.java | 3 ++- .../main/java/com/fr/design/style/FontFamilyPane.java | 3 ++- .../src/main/java/com/fr/design/utils/DesignUtils.java | 9 +++++++++ .../com/fr/design/chart/axis/ChartAlertValuePane.java | 3 ++- .../chart/series/SeriesCondition/DataLabelStylePane.java | 3 ++- .../mainframe/chart/gui/style/ChartTextAttrPane.java | 3 ++- .../style/background/VanChartAlertValuePane.java | 3 ++- .../designer/style/VanChartWordCloudSeriesPane.java | 3 ++- .../com/fr/design/gui/xpane/CardTagLayoutBorderPane.java | 3 ++- .../java/com/fr/design/gui/xpane/LayoutBorderPane.java | 3 ++- .../design/actions/cell/style/ReportFontNameAction.java | 3 ++- .../java/com/fr/design/cell/editor/RichTextToolBar.java | 3 ++- 18 files changed, 51 insertions(+), 17 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/fun/DefaultValueAdjustProvider.java b/designer-base/src/main/java/com/fr/design/fun/DefaultValueAdjustProvider.java index 0a93616293..1e553735dd 100644 --- a/designer-base/src/main/java/com/fr/design/fun/DefaultValueAdjustProvider.java +++ b/designer-base/src/main/java/com/fr/design/fun/DefaultValueAdjustProvider.java @@ -1,5 +1,6 @@ package com.fr.design.fun; +import com.fr.base.Utils; import com.fr.base.chart.BaseChartCollection; import com.fr.chartx.attr.ChartProvider; import com.fr.general.FRFont; @@ -53,4 +54,12 @@ public interface DefaultValueAdjustProvider extends Selectable { */ Font transformFontByResolution(FRFont font, int resolution); + /** + * 修改设计可用字体默认列表 + * @return + */ + default String[] getAvailableFontFamilyNames4Report() { + return Utils.getAvailableFontFamilyNames4Report(); + } + } diff --git a/designer-base/src/main/java/com/fr/design/gui/style/ComponentTitleStylePane.java b/designer-base/src/main/java/com/fr/design/gui/style/ComponentTitleStylePane.java index 33af029ad6..1f2fb91b82 100644 --- a/designer-base/src/main/java/com/fr/design/gui/style/ComponentTitleStylePane.java +++ b/designer-base/src/main/java/com/fr/design/gui/style/ComponentTitleStylePane.java @@ -12,6 +12,7 @@ import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.utils.DesignUtils; import com.fr.design.widget.FRWidgetFactory; import com.fr.form.ui.LayoutBorderStyle; import com.fr.form.ui.WidgetTitle; @@ -90,7 +91,7 @@ public class ComponentTitleStylePane extends AbstractBorderPackerPane { textContentPane = new TinyFormulaPane(); - fontFamilyComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report()); + fontFamilyComboBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report()); FRFont frFont = DEFAULT_TITLE_PACKER.getFrFont(); if (frFont != null) { String fontFamily = frFont.getFamily(); diff --git a/designer-base/src/main/java/com/fr/design/gui/style/FRFontPane.java b/designer-base/src/main/java/com/fr/design/gui/style/FRFontPane.java index f806ded065..8af5c08d40 100644 --- a/designer-base/src/main/java/com/fr/design/gui/style/FRFontPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/style/FRFontPane.java @@ -18,6 +18,7 @@ import com.fr.design.gui.icombobox.LineComboBox; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.utils.DesignUtils; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.ComparatorUtils; import com.fr.general.DefaultValues; @@ -246,7 +247,7 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse protected void initComponents() { fontSizeStyleComboBox = new UIComboBox(fontSizeStyles); - fontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report()); + fontNameComboBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report()); fontNameComboBox.setPreferredSize(new Dimension(144, 20)); fontSizeComboBox = new UIComboBox(getFontSizes()); fontSizeComboBox.setEditable(true); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SidebarMobileBookMarkStyleCustomDefinePane.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SidebarMobileBookMarkStyleCustomDefinePane.java index ae79160bbd..0ed58fa351 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SidebarMobileBookMarkStyleCustomDefinePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SidebarMobileBookMarkStyleCustomDefinePane.java @@ -17,6 +17,7 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.style.color.ColorSelectBox; +import com.fr.design.utils.DesignUtils; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.form.ui.mobile.MobileBookMarkStyle; import com.fr.form.ui.mobile.impl.SidebarMobileBookMarkStyle; @@ -161,7 +162,7 @@ public class SidebarMobileBookMarkStyleCustomDefinePane extends BasicBeanPane integerList = new Vector<>(); for (int i = 1; i < 100; i++) { integerList.add(i); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java index 2b19b232e3..a70870a61b 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java @@ -13,6 +13,7 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.utils.DesignUtils; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.FRFont; import com.fr.general.GeneralUtils; @@ -52,7 +53,7 @@ public class ChartFontPane extends BasicPane { } private void initState() { - fontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report()); + fontNameComboBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report()); fontSizeComboBox = new UIComboBox(FONT_SIZES); bold = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png")); italic = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png")); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/widget/MobileTabFontConfPane.java b/designer-base/src/main/java/com/fr/design/mainframe/widget/MobileTabFontConfPane.java index b4d678f985..8f10d21020 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/widget/MobileTabFontConfPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/widget/MobileTabFontConfPane.java @@ -5,6 +5,7 @@ import com.fr.base.Utils; import com.fr.design.gui.ibutton.UIColorButton; import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.utils.DesignUtils; import com.fr.general.FRFont; import javax.swing.Icon; @@ -38,7 +39,7 @@ public class MobileTabFontConfPane extends JPanel { private void init() { this.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 0)); - fontFamily = new UIComboBox(Utils.getAvailableFontFamilyNames4Report()); + fontFamily = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report()); Vector integerList = new Vector(); for (int i = 1; i < 100; i++) { integerList.add(i); diff --git a/designer-base/src/main/java/com/fr/design/style/FontFamilyPane.java b/designer-base/src/main/java/com/fr/design/style/FontFamilyPane.java index 37076c66fb..ba496ae138 100644 --- a/designer-base/src/main/java/com/fr/design/style/FontFamilyPane.java +++ b/designer-base/src/main/java/com/fr/design/style/FontFamilyPane.java @@ -3,6 +3,7 @@ package com.fr.design.style; import com.fr.base.Utils; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.utils.DesignUtils; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.FRFont; @@ -26,7 +27,7 @@ public class FontFamilyPane extends JPanel { familyField = new UITextField(); familyField.setEditable(false); - familyList = new JList(Utils.getAvailableFontFamilyNames4Report()); + familyList = new JList(DesignUtils.getAvailableFontFamilyNames4Report()); familyList.setVisibleRowCount(4); familyList.addListSelectionListener(listener); diff --git a/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java b/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java index dfeeacc608..dd7aaf3fcb 100644 --- a/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java +++ b/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java @@ -2,6 +2,7 @@ package com.fr.design.utils; import com.fr.base.FeedBackInfo; import com.fr.base.ServerConfig; +import com.fr.base.Utils; import com.fr.concurrent.NamedThreadFactory; import com.fr.design.DesignerEnvManager; import com.fr.design.ExtraDesignClassManager; @@ -481,4 +482,12 @@ public class DesignUtils { return null; } + public static String[] getAvailableFontFamilyNames4Report() { + DefaultValueAdjustProvider valueAdjust = DesignUtils.getValueAdjust(); + if (valueAdjust != null) { + return valueAdjust.getAvailableFontFamilyNames4Report(); + } + return Utils.getAvailableFontFamilyNames4Report(); + } + } diff --git a/designer-chart/src/main/java/com/fr/design/chart/axis/ChartAlertValuePane.java b/designer-chart/src/main/java/com/fr/design/chart/axis/ChartAlertValuePane.java index d0244cebab..59250c9725 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/axis/ChartAlertValuePane.java +++ b/designer-chart/src/main/java/com/fr/design/chart/axis/ChartAlertValuePane.java @@ -18,6 +18,7 @@ import com.fr.design.layout.TableLayoutHelper; import com.fr.design.style.AlphaPane; import com.fr.design.style.FRFontPane; import com.fr.design.style.color.ColorSelectBox; +import com.fr.design.utils.DesignUtils; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.FRFont; @@ -114,7 +115,7 @@ public class ChartAlertValuePane extends BasicBeanPane { fontNameBox.setPreferredSize(new Dimension(80,20)); fontNameBox.addItem("SimSun"); // TODO 这边字体中没有在列表内 - String[] names = Utils.getAvailableFontFamilyNames4Report(); + String[] names = DesignUtils.getAvailableFontFamilyNames4Report(); for(int i = 0; i < names.length; i++) { fontNameBox.addItem(names[i]); } diff --git a/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/DataLabelStylePane.java b/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/DataLabelStylePane.java index a2047b4e1c..c2036b7292 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/DataLabelStylePane.java +++ b/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/DataLabelStylePane.java @@ -9,6 +9,7 @@ import com.fr.chart.base.TextAttr; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.dialog.BasicPane; +import com.fr.design.utils.DesignUtils; import com.fr.general.FRFont; import com.fr.design.style.FRFontPane; @@ -36,7 +37,7 @@ public class DataLabelStylePane extends BasicPane { private void initPane(boolean isSurpportFontColor) { this.setLayout(FRGUIPaneFactory.createBoxFlowLayout()); - this.add(nameBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report())); + this.add(nameBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report())); nameBox.setPreferredSize(new Dimension(80, 20)); String[] styles = { 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 5a15bc1720..63b259e7aa 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 @@ -14,6 +14,7 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.TableLayout; import com.fr.design.mainframe.chart.mode.ChartEditContext; +import com.fr.design.utils.DesignUtils; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.FRFont; import com.fr.general.GeneralUtils; @@ -190,7 +191,7 @@ public class ChartTextAttrPane extends BasicPane { } protected void initState() { - fontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report()); + fontNameComboBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report()); fontSizeComboBox = new UIComboBox(getFontSizeComboBoxModel()); bold = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png")); italic = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png")); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAlertValuePane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAlertValuePane.java index 387d974d28..49e7f3fa99 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAlertValuePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAlertValuePane.java @@ -17,6 +17,7 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.style.color.ColorSelectBox; +import com.fr.design.utils.DesignUtils; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.FRFont; import com.fr.general.GeneralUtils; @@ -99,7 +100,7 @@ public class VanChartAlertValuePane extends BasicBeanPane { alertText.setPreferredSize(new Dimension(TEXT_WD, HT)); fontSize = new UIComboBox(FRFontPane.FONT_SIZES); - fontName = new UIComboBox(Utils.getAvailableFontFamilyNames4Report()); + fontName = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report()); fontColor = new ColorSelectBox(100); } diff --git a/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudSeriesPane.java index 543b8139f6..29624a5867 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudSeriesPane.java @@ -14,6 +14,7 @@ import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.backgroundpane.ImageBackgroundQuickPane; import com.fr.design.mainframe.chart.gui.ChartStylePane; +import com.fr.design.utils.DesignUtils; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.FRFont; import com.fr.general.IOUtils; @@ -94,7 +95,7 @@ public class VanChartWordCloudSeriesPane extends VanChartColorValueSeriesPane { double[] northC = {f, e}; double[] northR = {p, p}; - fontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report()); + fontNameComboBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report()); defineFontSize = new UIButtonGroup(new String[]{AUTO_FONT_SIZE, CUSTOM_FONT_SIZE}); Component[][] northComps = new Component[][]{ new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Font")), fontNameComboBox}, diff --git a/designer-form/src/main/java/com/fr/design/gui/xpane/CardTagLayoutBorderPane.java b/designer-form/src/main/java/com/fr/design/gui/xpane/CardTagLayoutBorderPane.java index fd0507c812..4d9d104abb 100644 --- a/designer-form/src/main/java/com/fr/design/gui/xpane/CardTagLayoutBorderPane.java +++ b/designer-form/src/main/java/com/fr/design/gui/xpane/CardTagLayoutBorderPane.java @@ -12,6 +12,7 @@ import com.fr.design.gui.style.FRFontPane; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.utils.DesignUtils; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.form.ui.LayoutBorderStyle; @@ -32,7 +33,7 @@ public class CardTagLayoutBorderPane extends LayoutBorderPane { protected UIScrollPane initRightBottomPane(){ this.setFontSizeComboBox(new UIComboBox(FRFontPane.FONT_SIZES)); - this.setFontNameComboBox(new UIComboBox(Utils.getAvailableFontFamilyNames4Report())); + this.setFontNameComboBox(new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report())); JPanel fontSizeTypePane = new JPanel(new BorderLayout(10,0)); fontSizeTypePane.add(this.getFontSizeComboBox(), BorderLayout.CENTER); fontSizeTypePane.add(this.getFontNameComboBox(), BorderLayout.EAST); diff --git a/designer-form/src/main/java/com/fr/design/gui/xpane/LayoutBorderPane.java b/designer-form/src/main/java/com/fr/design/gui/xpane/LayoutBorderPane.java index 7a00075d61..5294687e33 100644 --- a/designer-form/src/main/java/com/fr/design/gui/xpane/LayoutBorderPane.java +++ b/designer-form/src/main/java/com/fr/design/gui/xpane/LayoutBorderPane.java @@ -33,6 +33,7 @@ import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.VerticalFlowLayout; import com.fr.design.mainframe.JForm; import com.fr.design.mainframe.JTemplate; +import com.fr.design.utils.DesignUtils; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.form.ui.LayoutBorderStyle; import com.fr.form.ui.WidgetTitle; @@ -437,7 +438,7 @@ public class LayoutBorderPane extends BasicPane { protected UIScrollPane initRightBottomPane(){ formulaPane = new TinyFormulaPane(); fontSizeComboBox = new UIComboBox(FRFontPane.FONT_SIZES); - fontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report()); + fontNameComboBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report()); fontNameComboBox.setPreferredSize(new Dimension(160, 30)); JPanel fontSizeTypePane = new JPanel(new BorderLayout(10,0)); fontSizeTypePane.add(fontSizeComboBox, BorderLayout.CENTER); diff --git a/designer-realize/src/main/java/com/fr/design/actions/cell/style/ReportFontNameAction.java b/designer-realize/src/main/java/com/fr/design/actions/cell/style/ReportFontNameAction.java index 5023e6f4f1..2b423e0ab0 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/cell/style/ReportFontNameAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/cell/style/ReportFontNameAction.java @@ -3,6 +3,7 @@ */ package com.fr.design.actions.cell.style; +import com.fr.design.utils.DesignUtils; import com.fr.stable.os.OperatingSystem; import java.awt.Dimension; @@ -80,7 +81,7 @@ public class ReportFontNameAction extends AbstractStyleAction { public JComponent createToolBarComponent() { Object object = this.getValue(UIComboBox.class.getName()); if (object == null || !(object instanceof UIComboBox)) { - UIComboBox itemComponent = new UIComboBox(Utils.getAvailableFontFamilyNames4Report()); + UIComboBox itemComponent = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report()); this.putValue(UIComboBox.class.getName(), itemComponent); //设置最佳宽度. itemComponent.setPreferredSize(new Dimension( diff --git a/designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java b/designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java index ebaf13b7f8..0a5a93602d 100644 --- a/designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java +++ b/designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java @@ -21,6 +21,7 @@ import com.fr.design.mainframe.DesignerContext; import com.fr.design.report.RichTextEditingPane; import com.fr.design.style.color.UIToolbarColorButton; import com.fr.design.utils.DesignUtils; +import com.fr.design.utils.DesignUtils; import com.fr.general.FRFont; import com.fr.log.FineLoggerFactory; import com.fr.report.cell.cellattr.core.RichTextConverter; @@ -104,7 +105,7 @@ public class RichTextToolBar extends BasicPane { } private void initAllButton() { - fontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report()); + fontNameComboBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report()); fontNameComboBox.setPreferredSize(new Dimension(144, 20)); fontSizeComboBox = new UIComboBox(FRFontPane.getFontSizes()); colorSelectPane = new UIToolbarColorButton(BaseUtils.readIcon("/com/fr/design/images/gui/color/foreground.png")); From 74b88a3cae195c98b73fa685612e3687baee6de8 Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 15 Nov 2022 18:19:04 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/utils/DesignUtils.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java b/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java index dd7aaf3fcb..4779f91916 100644 --- a/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java +++ b/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java @@ -482,6 +482,10 @@ public class DesignUtils { return null; } + /** + * 获取设计器可用字体 + * @return + */ public static String[] getAvailableFontFamilyNames4Report() { DefaultValueAdjustProvider valueAdjust = DesignUtils.getValueAdjust(); if (valueAdjust != null) {