Browse Source

REPORT-83483 FVS内置素材新增商用免费字体适配

release/11.0
kerry 2 years ago
parent
commit
0c28b413e0
  1. 9
      designer-base/src/main/java/com/fr/design/fun/DefaultValueAdjustProvider.java
  2. 3
      designer-base/src/main/java/com/fr/design/gui/style/ComponentTitleStylePane.java
  3. 3
      designer-base/src/main/java/com/fr/design/gui/style/FRFontPane.java
  4. 5
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SidebarMobileBookMarkStyleCustomDefinePane.java
  5. 3
      designer-base/src/main/java/com/fr/design/mainframe/mobile/utils/FontConfigPane.java
  6. 3
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java
  7. 3
      designer-base/src/main/java/com/fr/design/mainframe/widget/MobileTabFontConfPane.java
  8. 3
      designer-base/src/main/java/com/fr/design/style/FontFamilyPane.java
  9. 9
      designer-base/src/main/java/com/fr/design/utils/DesignUtils.java
  10. 3
      designer-chart/src/main/java/com/fr/design/chart/axis/ChartAlertValuePane.java
  11. 3
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/DataLabelStylePane.java
  12. 3
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java
  13. 3
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAlertValuePane.java
  14. 3
      designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudSeriesPane.java
  15. 3
      designer-form/src/main/java/com/fr/design/gui/xpane/CardTagLayoutBorderPane.java
  16. 3
      designer-form/src/main/java/com/fr/design/gui/xpane/LayoutBorderPane.java
  17. 3
      designer-realize/src/main/java/com/fr/design/actions/cell/style/ReportFontNameAction.java
  18. 3
      designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java

9
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();
}
}

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

3
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);

5
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<Mo
normalBorderWidthComBox.setSelectedLineStyle(DEFAULT_STYLE.getBorderLineStyle());
normalBorderColorBox = new ColorSelectBox(COLUMN_WIDTH);
normalBorderColorBox.setSelectObject(DEFAULT_STYLE.getBorderColor());
normalFontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report());
normalFontNameComboBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report());
normalFontNameComboBox.setSelectedItem(DEFAULT_STYLE.getSelectedFontFamily());
normalFontSizeComboBox = new UIComboBox(FRFontPane.FONT_SIZES);
normalFontSizeComboBox.setSelectedItem(DEFAULT_STYLE.getFontSize());
@ -248,7 +249,7 @@ public class SidebarMobileBookMarkStyleCustomDefinePane extends BasicBeanPane<Mo
selectedBorderWidthComBox.setSelectedLineStyle(DEFAULT_STYLE.getSelectedBorderLineStyle());
selectedBorderColorBox = new ColorSelectBox(COLUMN_WIDTH);
selectedBorderColorBox.setSelectObject(DEFAULT_STYLE.getSelectedBorderColor());
selectedFontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report());
selectedFontNameComboBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report());
selectedFontNameComboBox.setSelectedItem(DEFAULT_STYLE.getSelectedFontFamily());
selectedFontSizeComboBox = new UIComboBox(FRFontPane.FONT_SIZES);
selectedFontSizeComboBox.setSelectedItem(DEFAULT_STYLE.getSelectedFontSize());

3
designer-base/src/main/java/com/fr/design/mainframe/mobile/utils/FontConfigPane.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.*;
@ -35,7 +36,7 @@ public class FontConfigPane extends JPanel {
private void init() {
this.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 0));
fontFamily = new UIComboBox(Utils.getAvailableFontFamilyNames4Report());
fontFamily = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report());
Vector<Integer> integerList = new Vector<>();
for (int i = 1; i < 100; i++) {
integerList.add(i);

3
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"));

3
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<Integer> integerList = new Vector<Integer>();
for (int i = 1; i < 100; i++) {
integerList.add(i);

3
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);

9
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();
}
}

3
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<ChartAlertValue> {
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]);
}

3
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 = {

3
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"));

3
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<VanChartAlertValue> {
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);
}

3
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},

3
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);

3
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);

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

3
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"));

Loading…
Cancel
Save