Browse Source

REPORT-46575【10.0.13冒烟】界面组件中硬编码的字体更改为统一UI字体

feature/big-screen
vito 4 years ago
parent
commit
233015a79a
  1. 10
      designer-base/src/main/java/com/fr/design/gui/date/CalendarNumberField.java
  2. 13
      designer-base/src/main/java/com/fr/design/gui/date/UICalendarPanel.java
  3. 5
      designer-base/src/main/java/com/fr/design/gui/date/UIDayLabel.java
  4. 14
      designer-base/src/main/java/com/fr/design/gui/itree/filetree/ReportletPane.java
  5. 5
      designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java
  6. 10
      designer-base/src/main/java/com/fr/design/mainframe/JSliderPane.java
  7. 15
      designer-form/src/main/java/com/fr/design/designer/creator/XButton.java
  8. 12
      designer-form/src/main/java/com/fr/design/widget/ui/designer/RadioDefinePane.java
  9. 10
      designer-realize/src/main/java/com/fr/design/condition/FontPane.java
  10. 9
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java
  11. 12
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/NoResultPane.java
  12. 18
      designer-realize/src/main/java/com/fr/design/mainframe/bbs/BBSLoginDialog.java
  13. 5
      designer-realize/src/main/java/com/fr/design/report/ReportColumnsPane.java
  14. 4
      designer-realize/src/main/java/com/fr/design/report/RichTextPane.java
  15. 12
      designer-realize/src/main/java/com/fr/design/widget/ui/RadioDefinePane.java
  16. 12
      designer-realize/src/main/java/com/fr/design/widget/ui/UserEditorDefinePane.java
  17. 4
      designer-realize/src/main/java/com/fr/quickeditor/floatquick/FloatStringQuickEditor.java

10
designer-base/src/main/java/com/fr/design/gui/date/CalendarNumberField.java

@ -1,12 +1,14 @@
package com.fr.design.gui.date;
import com.fr.design.gui.itextfield.UINumberField;
import com.fr.design.utils.DesignUtils;
import javax.swing.text.AttributeSet;
import javax.swing.text.BadLocationException;
import javax.swing.text.PlainDocument;
import java.awt.*;
import java.awt.Dimension;
import java.awt.Insets;
import java.awt.Toolkit;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
@ -30,7 +32,7 @@ public class CalendarNumberField extends UINumberField {
setValue(getIntValue());
}
});
this.setFont(new Font(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Song_TypeFace"),0,12));
this.setFont(DesignUtils.getDefaultGUIFont());
}
public void setValue(int value) {
@ -61,7 +63,6 @@ public class CalendarNumberField extends UINumberField {
}
public void setFieldDocument() {
setDocument(new NumberDocument());
}
@ -97,6 +98,7 @@ public class CalendarNumberField extends UINumberField {
public Dimension getPreferredSize() {
return new Dimension(24, 11);
}
public boolean shouldResponseChangeListener() {
return false;
}

13
designer-base/src/main/java/com/fr/design/gui/date/UICalendarPanel.java

@ -7,8 +7,8 @@ import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
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.GUIPaintUtils;
import com.fr.stable.Constants;
import com.fr.stable.StringUtils;
@ -45,8 +45,8 @@ import java.util.Calendar;
import java.util.Date;
public class UICalendarPanel extends JPanel {
private static final Font FONT_SONG = new Font(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Song_TypeFace"),0,12);
private static final Font FONT_BLACK = new Font(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Black_Font"),0,12);
private static final Font FONT_UI = DesignUtils.getDefaultGUIFont().applySize(12);
private static final Font FONT_BLACK = new Font(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Black_Font"), Font.PLAIN, 12);
private static final int WEEKDAY_COUNT = 7;
private static final int TOTAL_DAYS_COUNT = 42;
@ -130,7 +130,7 @@ public class UICalendarPanel extends JPanel {
monthLabel = new UILabel("", UILabel.CENTER);
monthLabel.setBackground(new Color(0xFFFFFF));
monthLabel.setForeground(new Color(0x000000));
monthLabel.setFont(FONT_SONG);
monthLabel.setFont(FONT_UI);
pNorth.add(Box.createHorizontalGlue());
pNorth.add(monthLabel);
pNorth.add(Box.createHorizontalGlue());
@ -204,7 +204,7 @@ public class UICalendarPanel extends JPanel {
sPane.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 6));
UILabel timeLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Time") + ":");
timeLabel.setBorder(BorderFactory.createEmptyBorder(0, 9, 0, 5));
timeLabel.setFont(FONT_SONG);
timeLabel.setFont(FONT_UI);
sPane.add(timeLabel);
hms = new HMSPane();
sPane.add(hms);
@ -222,7 +222,7 @@ public class UICalendarPanel extends JPanel {
return new Insets(0, 0, 0, 0);
}
};
okButton.setFont(FONT_SONG);
okButton.setFont(FONT_UI);
okButton.setVerticalAlignment(SwingConstants.CENTER);
okButton.addActionListener(new ActionListener() {
@ -248,6 +248,7 @@ public class UICalendarPanel extends JPanel {
/**
* 创建上一月,下一月,上一年,下一年"按钮"
*
* @param field int
* @param amount int
* @return UILabel

5
designer-base/src/main/java/com/fr/design/gui/date/UIDayLabel.java

@ -1,14 +1,13 @@
package com.fr.design.gui.date;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.utils.DesignUtils;
import java.awt.Dimension;
import java.awt.Font;
import java.text.SimpleDateFormat;
import java.util.Date;
public class UIDayLabel extends UILabel {
private Date date = null;
@ -28,7 +27,7 @@ public class UIDayLabel extends UILabel {
public UIDayLabel(Date date, boolean isSmallLabel) {
setHorizontalAlignment(UILabel.CENTER);
setFont(new Font(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Song_TypeFace"), 0, 12));
setFont(DesignUtils.getDefaultGUIFont());
this.date = date;
setPreferredSize(new Dimension(30, 18));
if (isSmallLabel) {

14
designer-base/src/main/java/com/fr/design/gui/itree/filetree/ReportletPane.java

@ -1,16 +1,18 @@
package com.fr.design.gui.itree.filetree;
import com.fr.base.FRContext;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.file.filetree.IOFileNodeFilter;
import javax.swing.*;
import java.awt.*;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@ -32,7 +34,7 @@ public class ReportletPane extends BasicPane {
textPane.setEditable(false);
textPane.setLineWrap(true);
textPane.setFont(FRContext.getDefaultValues().getFRFont().deriveFont(Font.BOLD, 12));
textPane.setFont(DesignUtils.getDefaultGUIFont().applyStyle(Font.BOLD));
textPane.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Schedule_The_Selected_File_Must_Be_End_With_Filter"));
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
@ -41,6 +43,7 @@ public class ReportletPane extends BasicPane {
switchButton = new UIButton("switch");
centerPane.add(GUICoreUtils.createBorderPane(switchButton, BorderLayout.WEST), BorderLayout.NORTH);
switchButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
switchCardPane(t_panel.isVisible());
}
@ -77,6 +80,7 @@ public class ReportletPane extends BasicPane {
*
* @throws Exception 抛错
*/
@Override
public void checkValid() throws Exception {
String path = this.getSelectedReportletPath();
if (path == null) {

5
designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java

@ -1,7 +1,6 @@
package com.fr.design.mainframe;
import com.fr.base.FRContext;
import com.fr.base.svg.IconUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignerEnvManager;
@ -16,9 +15,9 @@ import com.fr.design.layout.VerticalFlowLayout;
import com.fr.design.menu.SnapChatUtil;
import com.fr.design.notification.SnapChat;
import com.fr.design.ui.util.UIUtil;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.GUIPaintUtils;
import com.fr.general.FRFont;
import com.fr.log.FineLoggerFactory;
import com.fr.plugin.context.PluginContext;
import com.fr.plugin.context.PluginRuntime;
@ -1251,7 +1250,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
super.paint(g);
Image button;
g.setColor(new Color(69, 135, 255));
g.setFont(FRFont.getInstance().applySize(14));
g.setFont(DesignUtils.getDefaultGUIFont().applySize(14));
if (buttonType.equals(NO_BUTTON)) {
return;
}

10
designer-base/src/main/java/com/fr/design/mainframe/JSliderPane.java

@ -13,9 +13,9 @@ import com.fr.design.gui.ispinner.UISpinnerUI;
import com.fr.design.gui.itextfield.UITextField;
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 javax.swing.BorderFactory;
import javax.swing.ButtonGroup;
import javax.swing.JButton;
@ -37,7 +37,6 @@ import java.awt.Component;
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
@ -60,7 +59,6 @@ public class JSliderPane extends JPanel {
private static final double ONEPOINTEIGHT = 1.8;
private static final int SIX = 6;
private static final int TEN = 10;
private static final int FONT_SIZE = 12;
private static final int SPINNER_WIDTH = 45;
private static final int SPINNER_HEIGHT = 20;
private static final int HALF_HUNDRED = 50;
@ -194,9 +192,9 @@ public class JSliderPane extends JPanel {
fiveTenButton = new UIRadioButton("50%");
twoFiveButton = new UIRadioButton("25%");
selfAdaptButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Scale_Self_Adapt_Button"));
selfAdaptButton.setFont(new Font("SimSun", Font.PLAIN, FONT_SIZE));
selfAdaptButton.setFont(DesignUtils.getDefaultGUIFont());
customButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Scale_Custom_Button"));
customButton.setFont(new Font("SimSun", Font.PLAIN, FONT_SIZE));
customButton.setFont(DesignUtils.getDefaultGUIFont());
twoHundredButton.addItemListener(radioButtonItemListener);
oneHundredButton.addItemListener(radioButtonItemListener);
sevenFiveButton.addItemListener(radioButtonItemListener);
@ -265,7 +263,7 @@ public class JSliderPane extends JPanel {
JPanel spinnerPanel = new JPanel(new FlowLayout());
spinnerPanel.add(showValSpinner);
UILabel percent = new UILabel("%");
percent.setFont(new Font("SimSun", Font.PLAIN, FONT_SIZE));
percent.setFont(DesignUtils.getDefaultGUIFont());
spinnerPanel.add(percent);
spinnerPanel.setBackground(BACK_COLOR);
return spinnerPanel;

15
designer-form/src/main/java/com/fr/design/designer/creator/XButton.java

@ -14,11 +14,11 @@ import com.fr.design.mainframe.widget.editors.ImgBackgroundEditor;
import com.fr.design.mainframe.widget.editors.ShortCutTextEditor;
import com.fr.design.mainframe.widget.renderer.FontCellRenderer;
import com.fr.design.mainframe.widget.renderer.IconCellRenderer;
import com.fr.design.utils.DesignUtils;
import com.fr.form.parameter.FormSubmitButton;
import com.fr.form.ui.Button;
import com.fr.form.ui.FreeButton;
import com.fr.general.Background;
import com.fr.stable.ArrayUtils;
import com.fr.stable.core.PropertyChangeAdapter;
@ -29,7 +29,6 @@ import java.awt.AlphaComposite;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
@ -42,7 +41,6 @@ import java.beans.IntrospectionException;
public class XButton extends XWidgetCreator {
public final static Background DEFAULTBG = new GradientBackground(new Color(247, 247, 247), new Color(210, 210, 210), GradientBackground.TOP2BOTTOM);
public final static Font DEFAULTFT = new Font("Song_TypeFace",0,12);
public final static Color DEFAULTFOREGROUNDCOLOR = Color.BLACK;
private Background bg;
private UILabel contentLabel;
@ -77,6 +75,7 @@ public class XButton extends XWidgetCreator {
/**
* 根据下拉框选择返回按钮样式的默认设置或自定义设置列表
*
* @return 列表
* @throws IntrospectionException 抛错
*/
@ -117,6 +116,7 @@ public class XButton extends XWidgetCreator {
};
return crPropertyDescriptors[i];
}
protected CRPropertyDescriptor[] getisCustomStyle() throws IntrospectionException {
return new CRPropertyDescriptor[]{
creatNonListenerStyle(0).setPropertyChangeListener(new PropertyChangeAdapter() {
@ -193,6 +193,7 @@ public class XButton extends XWidgetCreator {
};
}
@Override
protected JComponent initEditor() {
if (editor == null) {
@ -230,7 +231,7 @@ public class XButton extends XWidgetCreator {
if (!button.isCustomStyle()) {
l.setBorder(BorderFactory.createLineBorder(new Color(148, 148, 148)));
bg = DEFAULTBG;
contentLabel.setFont(DEFAULTFT);
contentLabel.setFont(DesignUtils.getDefaultGUIFont());
contentLabel.setForeground(DEFAULTFOREGROUNDCOLOR);
editor.setLayout(new BorderLayout());
editor.add(l, BorderLayout.CENTER);
@ -276,8 +277,10 @@ public class XButton extends XWidgetCreator {
/**
* 初始化按钮的Size
*
* @return 尺寸
*/
@Override
public Dimension initEditorSize() {
FreeButton button = (FreeButton) data;
if (checkbutton(button)) {
@ -285,9 +288,11 @@ public class XButton extends XWidgetCreator {
}
return super.initEditorSize();
}
private boolean checkbutton(FreeButton button) {
return (button.isCustomStyle() && button.getButtonHeight() > 0 && button.getButtonWidth() > 0);
}
@Override
protected String getIconName() {
return "button_16.png";
@ -295,8 +300,8 @@ public class XButton extends XWidgetCreator {
/**
* data属性改变触发其他操作
*
*/
@Override
public void firePropertyChange() {
FreeButton button = (FreeButton) data;
setButtonText(button.getText());

12
designer-form/src/main/java/com/fr/design/widget/ui/designer/RadioDefinePane.java

@ -1,15 +1,14 @@
package com.fr.design.widget.ui.designer;
import com.fr.base.FRContext;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.DesignUtils;
import com.fr.form.ui.Radio;
import com.fr.general.FRFont;
import javax.swing.*;
import java.awt.*;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Font;
/**
* @deprecated
@ -25,8 +24,7 @@ public class RadioDefinePane extends AbstractDataModify<Radio> {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
UILabel infoLabel = new UILabel();
FRFont frFont = FRContext.getDefaultValues().getFRFont();
infoLabel.setFont(new Font(frFont.getFamily(), Font.BOLD, 24));
infoLabel.setFont(DesignUtils.getDefaultGUIFont().applySize(24).applyStyle(Font.BOLD));
infoLabel.setText(com.fr.design.i18n.Toolkit.i18nText(
"Fine-Design_Report_No_Editor_Property_Definition") + ".");
infoLabel.setHorizontalAlignment(SwingConstants.CENTER);

10
designer-realize/src/main/java/com/fr/design/condition/FontPane.java

@ -7,13 +7,13 @@ import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.style.FRFontPane;
import com.fr.design.style.FRFontPreviewArea;
import com.fr.general.FRFont;
import com.fr.design.utils.DesignUtils;
import com.fr.report.cell.cellattr.highlight.FRFontHighlightAction;
import com.fr.report.cell.cellattr.highlight.HighlightAction;
import javax.swing.*;
import java.awt.*;
import javax.swing.BorderFactory;
import javax.swing.SwingUtilities;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@ -60,7 +60,7 @@ public class FontPane extends ConditionAttrSingleConditionPane<HighlightAction>
this.add(frFontPreviewPane);
this.add(editFRFontButton);
this.add(this.fontScopeComboBox);
this.frFontPreviewPane.setFontObject(FRFont.getInstance());
this.frFontPreviewPane.setFontObject(DesignUtils.getDefaultGUIFont());
}
@Override

9
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe.alphafine;
import com.fr.base.extension.FileExtension;
import com.fr.design.utils.DesignUtils;
import com.fr.general.CloudCenter;
import java.awt.Color;
@ -73,15 +74,15 @@ public class AlphaFineConstants {
public static final String HIGH_LIGHT_COLOR = "rgb(51,148,240)";
public static final Font SMALL_FONT = new Font("Song_TypeFace", 0, 10);
public static final Font SMALL_FONT = DesignUtils.getDefaultGUIFont().applySize(10);
public static final Font MEDIUM_FONT = new Font("Song_TypeFace", 0, 12);
public static final Font MEDIUM_FONT = DesignUtils.getDefaultGUIFont().applySize(12);
public static final Font MEDIUM_FONT_ANOTHER = new Font("HiraginoSansGB-W3", 0, 12);
public static final Font LARGE_FONT = new Font("Song_TypeFace", 0, 18);
public static final Font LARGE_FONT = DesignUtils.getDefaultGUIFont().applySize(18);
public static final Font GREATER_FONT = new Font("Song_TypeFace", 0, 20);
public static final Font GREATER_FONT = DesignUtils.getDefaultGUIFont().applySize(20);
public static final String IMAGE_URL = "/com/fr/design/mainframe/alphafine/images/";

12
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/NoResultPane.java

@ -3,10 +3,14 @@ package com.fr.design.mainframe.alphafine.preview;
import com.bulenkov.iconloader.IconLoader;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.alphafine.AlphaFineConstants;
import com.fr.general.FRFont;
import com.fr.design.utils.DesignUtils;
import javax.swing.*;
import java.awt.*;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
/**
* Created by XiaXiang on 2017/8/14.
@ -23,7 +27,7 @@ public class NoResultPane extends JPanel {
image.setBorder(BorderFactory.createEmptyBorder(100, 0, 0, 0));
UILabel description = new UILabel(title);
description.setForeground(AlphaFineConstants.MEDIUM_GRAY);
description.setFont(FRFont.getInstance("SimSun", Font.PLAIN, 14));
description.setFont(DesignUtils.getDefaultGUIFont().applySize(14));
description.setBorder(BorderFactory.createEmptyBorder(0, 0, 135, 0));
description.setHorizontalAlignment(SwingConstants.CENTER);
add(image, BorderLayout.CENTER);

18
designer-realize/src/main/java/com/fr/design/mainframe/bbs/BBSLoginDialog.java

@ -8,16 +8,24 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ipasswordfield.UIPassWordField;
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.*;
import com.fr.general.CloudCenter;
import com.fr.general.ComparatorUtils;
import com.fr.general.http.HttpClient;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.EncodeConstants;
import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Desktop;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.Frame;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyAdapter;
@ -37,7 +45,7 @@ public class BBSLoginDialog extends UIDialog {
private static final int DIALOG_WIDTH = 400;
private static final int DIALOG_HEIGHT = 200;
private static final Font DEFAULT_FONT = FRFont.getInstance(FRFont.DEFAULT_FONTNAME, 0, 14);
private static final Font DEFAULT_FONT = DesignUtils.getDefaultGUIFont().applySize(14);
private static final int TIME_OUT = 10000;
private static final int BUTTON_WIDTH = 90;

5
designer-realize/src/main/java/com/fr/design/report/ReportColumnsPane.java

@ -12,6 +12,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UIBasicSpinner;
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;
import com.fr.general.IOUtils;
@ -32,7 +33,6 @@ import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
@ -59,7 +59,6 @@ public class ReportColumnsPane extends BasicPane{
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Columns_Repeat_Column")
};
private static final String FONT_NAME = "simsun";
private static final int FONT_SIZE = 14;
private UIButtonGroup onOffButtonGroup;
@ -109,7 +108,7 @@ public class ReportColumnsPane extends BasicPane{
onOffButtonGroup.addActionListener(onOffListener);
UILabel uiLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ReportColumns_Columns"));
FRFont uiLableFont = FRFont.getInstance(FONT_NAME, Font.PLAIN, FONT_SIZE);
FRFont uiLableFont = DesignUtils.getDefaultGUIFont().applySize(FONT_SIZE);
uiLabel.setFont(uiLableFont);
uiLabel.setHorizontalAlignment(SwingConstants.CENTER);
int uiLabelWidth = GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ReportColumns_Columns"), uiLableFont);

4
designer-realize/src/main/java/com/fr/design/report/RichTextPane.java

@ -1,12 +1,12 @@
package com.fr.design.report;
import com.fr.base.BaseFormula;
import com.fr.base.FRContext;
import com.fr.base.Style;
import com.fr.design.cell.editor.RichTextToolBar;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.DesignUtils;
import com.fr.general.ComparatorUtils;
import com.fr.general.FRFont;
import com.fr.log.FineLoggerFactory;
@ -37,7 +37,7 @@ public class RichTextPane extends BasicPane {
//12号字体有个奇怪的bug, 字体下部分渲染会截断一部分, 换其他字体没问题, 字体改大小也没问题.
//直接弄个jtexarea放到jframe里也有同样问题, 不知道是字体渲染bug还是jdk问题
public static final FRFont DEFAUL_FONT = FRContext.getDefaultValues().getFRFont().applySize(13);
public static final FRFont DEFAUL_FONT = DesignUtils.getDefaultGUIFont().applySize(13);
private RichTextEditingPane textPane;
//用于populate时动态更新按钮

12
designer-realize/src/main/java/com/fr/design/widget/ui/RadioDefinePane.java

@ -1,14 +1,13 @@
package com.fr.design.widget.ui;
import com.fr.base.FRContext;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.DesignUtils;
import com.fr.form.ui.Radio;
import com.fr.general.FRFont;
import javax.swing.*;
import java.awt.*;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Font;
/**
* @deprecated
@ -23,8 +22,7 @@ public class RadioDefinePane extends AbstractDataModify<Radio> {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
UILabel infoLabel = new UILabel();
FRFont frFont = FRContext.getDefaultValues().getFRFont();
infoLabel.setFont(new Font(frFont.getFamily(), Font.BOLD, 24));
infoLabel.setFont(DesignUtils.getDefaultGUIFont().applySize(24).applyStyle(Font.BOLD));
infoLabel.setText(com.fr.design.i18n.Toolkit.i18nText(
"Fine-Design_Report_No_Editor_Property_Definition") + ".");
infoLabel.setHorizontalAlignment(SwingConstants.CENTER);

12
designer-realize/src/main/java/com/fr/design/widget/ui/UserEditorDefinePane.java

@ -1,14 +1,13 @@
package com.fr.design.widget.ui;
import com.fr.base.FRContext;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.DesignUtils;
import com.fr.form.ui.NameWidget;
import com.fr.general.FRFont;
import javax.swing.*;
import java.awt.*;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Font;
public class UserEditorDefinePane extends AbstractDataModify<NameWidget> {
private NameWidget nWidget;
@ -20,8 +19,7 @@ public class UserEditorDefinePane extends AbstractDataModify<NameWidget> {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
UILabel infoLabel = new UILabel();
FRFont frFont = FRContext.getDefaultValues().getFRFont();
infoLabel.setFont(new Font(frFont.getFamily(), Font.BOLD, 24));
infoLabel.setFont(DesignUtils.getDefaultGUIFont().applySize(24).applyStyle(Font.BOLD));
infoLabel.setText(com.fr.design.i18n.Toolkit.i18nText(
"Fine-Design_Report_Widget_User_Defined_Editor") + ".");
infoLabel.setHorizontalAlignment(SwingConstants.CENTER);

4
designer-realize/src/main/java/com/fr/quickeditor/floatquick/FloatStringQuickEditor.java

@ -8,6 +8,7 @@ import com.fr.design.constants.UIConstants;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.utils.DesignUtils;
import com.fr.quickeditor.FloatQuickEditor;
import com.fr.report.ReportHelper;
import com.fr.stable.StringUtils;
@ -20,7 +21,6 @@ import javax.swing.event.DocumentListener;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@ -77,7 +77,7 @@ public class FloatStringQuickEditor extends FloatQuickEditor {
}
private void initTextField() {
stringTextField.setFont(new Font("Dialog", Font.PLAIN, 12));
stringTextField.setFont(DesignUtils.getDefaultGUIFont());
stringTextField.setOpaque(true);
stringTextField.setLineWrap(true);
stringTextField.setWrapStyleWord(true);

Loading…
Cancel
Save