Browse Source

Merge pull request #3283 in DESIGN/design from release/10.0 to bugfix/10.0

* commit 'de688af0ca61c6dcde1e16228988887df0ec8400':
  REPORT-32210 release传一份
  REPORT-46575【10.0.13冒烟】界面组件中硬编码的字体更改为统一UI字体
  REPORT-46353 jdk8-插入普通文本图标变模糊了 【问题原因】之前的获取系统scale的方法有点问题,如果是jdk8,mac下会获取到1.0,然后图标就没有jdk11下获取成2.0那么清晰 【改动思路】直接判断下是不是retina显示,如果是的,返回2.0的scale;另外发现定义数据连接的svg图片漏传了,也传一下
bugfix/10.0
superman 4 years ago
parent
commit
d3543725e8
  1. 7
      designer-base/src/main/java/com/fr/base/svg/SystemScaleUtils.java
  2. 22
      designer-base/src/main/java/com/fr/design/gui/date/CalendarNumberField.java
  3. 123
      designer-base/src/main/java/com/fr/design/gui/date/UICalendarPanel.java
  4. 7
      designer-base/src/main/java/com/fr/design/gui/date/UIDayLabel.java
  5. 22
      designer-base/src/main/java/com/fr/design/gui/itree/filetree/ReportletPane.java
  6. 5
      designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java
  7. 10
      designer-base/src/main/java/com/fr/design/mainframe/JSliderPane.java
  8. 11
      designer-base/src/main/resources/com/fr/design/images/m_web/connection_normal.svg
  9. 13
      designer-form/src/main/java/com/fr/design/designer/beans/LayoutAdapter.java
  10. 435
      designer-form/src/main/java/com/fr/design/designer/creator/XButton.java
  11. 70
      designer-form/src/main/java/com/fr/design/widget/ui/designer/RadioDefinePane.java
  12. 10
      designer-realize/src/main/java/com/fr/design/condition/FontPane.java
  13. 9
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java
  14. 12
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/NoResultPane.java
  15. 18
      designer-realize/src/main/java/com/fr/design/mainframe/bbs/BBSLoginDialog.java
  16. 5
      designer-realize/src/main/java/com/fr/design/report/ReportColumnsPane.java
  17. 4
      designer-realize/src/main/java/com/fr/design/report/RichTextPane.java
  18. 68
      designer-realize/src/main/java/com/fr/design/widget/ui/RadioDefinePane.java
  19. 12
      designer-realize/src/main/java/com/fr/design/widget/ui/UserEditorDefinePane.java
  20. 4
      designer-realize/src/main/java/com/fr/quickeditor/floatquick/FloatStringQuickEditor.java

7
designer-base/src/main/java/com/fr/base/svg/SystemScaleUtils.java

@ -1,5 +1,6 @@
package com.fr.base.svg;
import com.bulenkov.iconloader.util.UIUtil;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StableUtils;
import com.fr.stable.os.OperatingSystem;
@ -77,6 +78,10 @@ public class SystemScaleUtils {
* @return
*/
public static float sysScale() {
// 如果检测到是retina,直接返回2
if (UIUtil.isRetina()) {
return 2.0f;
}
float scale = 1.0f;
// 先判断是否支持高清,不支持代表此时是Windows + jdk8 的设计器,返回的scale值为1.0
if (isJreHiDPIEnabled()) {
@ -86,7 +91,7 @@ public class SystemScaleUtils {
// 获取图形配置对象
GraphicsConfiguration configuration = graphicsDevice.getDefaultConfiguration();
if (configuration != null && configuration.getDevice().getType() != GraphicsDevice.TYPE_PRINTER) {
// 获取屏幕缩放率,mac下固定为2,Windows+jdk11则将得到用户设置的dpi值
// 获取屏幕缩放率,Windows+jdk11环境下会得到用户设置的dpi值
scale = (float) configuration.getDefaultTransform().getScaleX();
}
}

22
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;
@ -21,7 +23,7 @@ public class CalendarNumberField extends UINumberField {
private static final int NUM_TEN = 10;
public CalendarNumberField( double maxValue) {
public CalendarNumberField(double maxValue) {
super(2, 0, 0, maxValue);
this.setBorderPainted(false);
addFocusListener(new FocusAdapter() {
@ -30,12 +32,12 @@ 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) {
if (value < 0) {
value = (int)getMaxValue();
value = (int) getMaxValue();
}
if (value > getMaxValue()) {
value = 0;
@ -43,7 +45,7 @@ public class CalendarNumberField extends UINumberField {
this.setText(getValueText(value));
}
public int getIntValue () {
public int getIntValue() {
if (this.getText().length() == 0) {
return 0;
}
@ -61,8 +63,7 @@ public class CalendarNumberField extends UINumberField {
}
public void setFieldDocument(){
public void setFieldDocument() {
setDocument(new NumberDocument());
}
@ -89,14 +90,15 @@ public class CalendarNumberField extends UINumberField {
super.insertString(offset, s, a);
}
private boolean isOverMaxOrMinValue( String strNew) {
return (Double.parseDouble(strNew)<getMinValue() || Double.parseDouble(strNew)>getMaxValue());
private boolean isOverMaxOrMinValue(String strNew) {
return (Double.parseDouble(strNew) < getMinValue() || Double.parseDouble(strNew) > getMaxValue());
}
}
public Dimension getPreferredSize() {
return new Dimension(24, 11);
}
public boolean shouldResponseChangeListener() {
return false;
}

123
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;
@ -108,13 +108,13 @@ public class UICalendarPanel extends JPanel {
}
// << < yyyy/MM/dd > >>
private JPanel createNorthPane () {
private JPanel createNorthPane() {
JPanel pNorth = FRGUIPaneFactory.createX_AXISBoxInnerContainer_S_Pane();
pNorth.setBackground(new Color(0xFFFFFF));
pNorth.setPreferredSize(new Dimension(1, 22));
pNorth.add(Box.createHorizontalStrut(5));
pNorth.add(createSkipButton(Calendar.YEAR, -1 , new Icon[] {
pNorth.add(createSkipButton(Calendar.YEAR, -1, new Icon[]{
BaseUtils.readIcon("/com/fr/design/images/calender/year_reduce.png"),
BaseUtils.readIcon("/com/fr/design/images/calender/year_reduce_hover.png"),
BaseUtils.readIcon("/com/fr/design/images/calender/year_reduce_click.png")
@ -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());
@ -144,7 +144,7 @@ public class UICalendarPanel extends JPanel {
monthPlus.setHorizontalAlignment(SwingConstants.RIGHT);
pNorth.add(monthPlus);
pNorth.add(Box.createHorizontalStrut(11));
pNorth.add(createSkipButton(Calendar.YEAR, 1 , new Icon[] {
pNorth.add(createSkipButton(Calendar.YEAR, 1, new Icon[]{
BaseUtils.readIcon("/com/fr/design/images/calender/year_add.png"),
BaseUtils.readIcon("/com/fr/design/images/calender/year_add_hover.png"),
BaseUtils.readIcon("/com/fr/design/images/calender/year_add_click.png")
@ -161,9 +161,9 @@ public class UICalendarPanel extends JPanel {
pWeeks.setPreferredSize(new Dimension(216, 22));
pWeeks.setBackground(new Color(0xFFFFFF));
pWeeks.setOpaque(true);
String[] strWeeks = new String[] {StringUtils.EMPTY, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Sun"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Mon"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tue"),com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Wed"),com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Thu"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Fri"),com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Sat")
String[] strWeeks = new String[]{StringUtils.EMPTY, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Sun"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Mon"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tue"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Wed"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Thu"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Fri"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Sat")
};
for (int i = 1; i <= WEEKDAY_COUNT; i++) {
UILabel label = new UILabel();
@ -197,32 +197,32 @@ public class UICalendarPanel extends JPanel {
return pCenter;
}
private JPanel createSouthPane () {
private JPanel createSouthPane() {
JPanel sPane = new JPanel();
sPane.setPreferredSize(new Dimension(216, 30));
sPane.setBackground(Color.WHITE);
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.setBorder(BorderFactory.createEmptyBorder(0, 9, 0, 5));
timeLabel.setFont(FONT_UI);
sPane.add(timeLabel);
hms = new HMSPane();
sPane.add(hms);
UILabel gap = new UILabel();
gap.setPreferredSize(new Dimension(26,1));
gap.setPreferredSize(new Dimension(26, 1));
sPane.add(gap);
UIButton okButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_OK")) {
public Dimension getPreferredSize() {
return new Dimension(32,18);
return new Dimension(32, 18);
}
public Insets getInsets() {
return new Insets(0, 0, 0, 0);
}
};
okButton.setFont(FONT_SONG);
okButton.setFont(FONT_UI);
okButton.setVerticalAlignment(SwingConstants.CENTER);
okButton.addActionListener(new ActionListener() {
@ -248,11 +248,12 @@ public class UICalendarPanel extends JPanel {
/**
* 创建上一月,下一月,上一年,下一年"按钮"
* @param field int
*
* @param field int
* @param amount int
* @return UILabel
*/
protected UILabel createSkipButton(final int field, final int amount,final Icon[] icons) {
protected UILabel createSkipButton(final int field, final int amount, final Icon[] icons) {
if (icons.length != 3) {
return new UILabel();
}
@ -274,11 +275,11 @@ public class UICalendarPanel extends JPanel {
}
public void mouseEntered(MouseEvent e) {
label.setIcon(icons[1]);
label.setIcon(icons[1]);
}
public void mouseExited(MouseEvent e) {
label.setIcon(icons[0]);
label.setIcon(icons[0]);
}
public void mousePressed(MouseEvent e) {
@ -311,7 +312,7 @@ public class UICalendarPanel extends JPanel {
gp.setBorder(null);
UIDayLabel label = new UIDayLabel(setupCalendar.getTime());
label.setHorizontalAlignment(SwingConstants.RIGHT);
label.setBorder(BorderFactory.createEmptyBorder(0,0,0,9));
label.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 9));
label.addMouseListener(dayBttListener);
if ("1".equals(label.getText())) {
isCurrentMonth = !isCurrentMonth;
@ -328,7 +329,7 @@ public class UICalendarPanel extends JPanel {
days.setSelectedIndex(i);
this.selectedDate = label.getDate();
this.calendar.setTime(this.selectedDate);
}else {
} else {
gp.add(label, BorderLayout.CENTER);
days.add(gp);
}
@ -337,7 +338,7 @@ public class UICalendarPanel extends JPanel {
}
public void updateHMS() {
if (hms != null){
if (hms != null) {
hms.populate(this.calendar);
hms.validate();
}
@ -388,9 +389,9 @@ public class UICalendarPanel extends JPanel {
public void mousePressed(MouseEvent e) {
if (isEnabled()) {
UIDayLabel com = (UIDayLabel) e.getComponent();
GradientPane gp = (GradientPane)com.getParent();
GradientPane gp = (GradientPane) com.getParent();
if (days.selectedIndex != -1) {
((GradientPane)days.getComponent(days.selectedIndex)).setGradientBackground(new GradientBackground(new Color(0xFEFEFE), new Color(0xF3F2F3), GradientBackground.TOP2BOTTOM));
((GradientPane) days.getComponent(days.selectedIndex)).setGradientBackground(new GradientBackground(new Color(0xFEFEFE), new Color(0xF3F2F3), GradientBackground.TOP2BOTTOM));
}
gp.setGradientBackground(new GradientBackground(new Color(0x097BD9), new Color(0x41A3EE), GradientBackground.TOP2BOTTOM));
days.setSelectedIndex(gp.getIndex());
@ -413,7 +414,7 @@ public class UICalendarPanel extends JPanel {
public void mouseEntered(MouseEvent e) {
if (isEnabled()) {
JComponent com = (JComponent) e.getComponent();
GradientPane gp = (GradientPane)com.getParent();
GradientPane gp = (GradientPane) com.getParent();
if (gp.getIndex() == days.selectedIndex) {
return;
}
@ -426,7 +427,7 @@ public class UICalendarPanel extends JPanel {
public void mouseExited(MouseEvent e) {
if (isEnabled()) {
JComponent com = (JComponent) e.getComponent();
GradientPane gp = (GradientPane)com.getParent();
GradientPane gp = (GradientPane) com.getParent();
if (gp.getIndex() != days.selectedIndex) {
gp.setGradientBackground(new GradientBackground(new Color(0xFEFEFE), new Color(0xF3F2F3), GradientBackground.TOP2BOTTOM));
}
@ -489,7 +490,7 @@ public class UICalendarPanel extends JPanel {
this.isGradientBackground = isGradientBackground;
}
public void paint(Graphics g){
public void paint(Graphics g) {
super.paint(g);
if (isGradientBackground && gradientBackground != null) {
gradientBackground.paint(g, new Rectangle(this.getWidth(), this.getHeight()));
@ -509,7 +510,7 @@ public class UICalendarPanel extends JPanel {
this.index = i;
}
public int getIndex () {
public int getIndex() {
return this.index;
}
@ -530,12 +531,12 @@ public class UICalendarPanel extends JPanel {
public DayPane() {
floateIndex = -1;
selectedIndex = -1;
this.setLayout(new GridLayout(6,7,1,1));
this.setLayout(new GridLayout(6, 7, 1, 1));
this.setBackground(new Color(0xFFFFFF));
this.setBorder(BorderFactory.createMatteBorder(1, 0, 1, 0, new Color(0xDADADA)));
}
public void paint (Graphics g) {
public void paint(Graphics g) {
super.paint(g);
int width = 31;
int height = 19;
@ -543,11 +544,11 @@ public class UICalendarPanel extends JPanel {
g.setColor(new Color(0xDADADA));
int start_x = 30;
int start_y = 19;
for (int i = 0; i < 6; i ++) {
for (int i = 0; i < 6; i++) {
g.drawLine(start_x, 0, start_x, getHeight());
start_x += width;
}
for (int i = 0; i < 5; i ++){
for (int i = 0; i < 5; i++) {
g.drawLine(0, start_y, getWidth(), start_y);
start_y += height;
}
@ -558,25 +559,25 @@ public class UICalendarPanel extends JPanel {
}
if (selectedIndex > -1) {
g.setColor(selectedColor);
paintChindPane(g,selectedIndex);
paintChindPane(g, selectedIndex);
}
g.setColor(oldColor);
}
private void paintChindPane(Graphics g, int index) {
if (index%7 == 0 ) {
int y1 = index/7*19;
g.drawLine(0,y1,30,y1);
g.drawLine(0,y1 + 19, 30, y1 +19);
g.drawLine(30, y1, 30 ,y1 + 19);
}else if (index%7 == 6) {
int y1 = index/7*19;
g.drawLine(185,y1,216,y1);
g.drawLine(185,y1 + 19, 216, y1 +19);
g.drawLine(185, y1, 185 ,y1 + 19);
if (index % 7 == 0) {
int y1 = index / 7 * 19;
g.drawLine(0, y1, 30, y1);
g.drawLine(0, y1 + 19, 30, y1 + 19);
g.drawLine(30, y1, 30, y1 + 19);
} else if (index % 7 == 6) {
int y1 = index / 7 * 19;
g.drawLine(185, y1, 216, y1);
g.drawLine(185, y1 + 19, 216, y1 + 19);
g.drawLine(185, y1, 185, y1 + 19);
} else {
int x1 = index%7*31 -1;
int y1 = index/7*19;
int x1 = index % 7 * 31 - 1;
int y1 = index / 7 * 19;
g.drawRect(x1, y1, 31, 19);
}
}
@ -599,7 +600,7 @@ public class UICalendarPanel extends JPanel {
}
private class HMSPane extends JPanel{
private class HMSPane extends JPanel {
private boolean isRolOver;
private UIButton preButton;
private UIButton nextButton;
@ -608,7 +609,7 @@ public class UICalendarPanel extends JPanel {
private CalendarNumberField sField;
private CalendarNumberField selectedNumberField;
public HMSPane () {
public HMSPane() {
this.setPreferredSize(new Dimension(101, 18));
this.setLayout(new BorderLayout(0, 0));
this.setBackground(null);
@ -633,7 +634,7 @@ public class UICalendarPanel extends JPanel {
}
private void initComponents() {
JPanel jp = new JPanel(new FlowLayout(FlowLayout.LEFT,0,2));
JPanel jp = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 2));
jp.setBackground(null);
jp.setBorder(null);
@ -649,13 +650,13 @@ public class UICalendarPanel extends JPanel {
jp.add(sField);
this.add(jp, BorderLayout.CENTER);
preButton = new UIButton(UIConstants.ARROW_UP_ICON){
preButton = new UIButton(UIConstants.ARROW_UP_ICON) {
public boolean shouldResponseChangeListener() {
return false;
}
};
preButton.setRoundBorder(true, Constants.LEFT);
nextButton = new UIButton(UIConstants.ARROW_DOWN_ICON){
nextButton = new UIButton(UIConstants.ARROW_DOWN_ICON) {
public boolean shouldResponseChangeListener() {
return false;
}
@ -673,7 +674,7 @@ public class UICalendarPanel extends JPanel {
MouseAdapter backgroundAdapter = new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
HMSPane.this.selectedNumberField = (CalendarNumberField)e.getComponent();
HMSPane.this.selectedNumberField = (CalendarNumberField) e.getComponent();
}
@Override
@ -710,17 +711,17 @@ public class UICalendarPanel extends JPanel {
});
}
private UILabel createGapLabel () {
private UILabel createGapLabel() {
UILabel uiLabel = new UILabel(":");
uiLabel.setHorizontalAlignment(SwingConstants.CENTER);
uiLabel.setBackground(null);
uiLabel.setBorder(null);
uiLabel.setPreferredSize(new Dimension(6,10));
uiLabel.setPreferredSize(new Dimension(6, 10));
return uiLabel;
}
public Insets getInsets() {
return new Insets(1,3,1,0);
return new Insets(1, 3, 1, 0);
}
public void paint(Graphics g) {
@ -729,7 +730,7 @@ public class UICalendarPanel extends JPanel {
}
public void paintBorder(Graphics g) {
Graphics2D g2d = (Graphics2D)g;
Graphics2D g2d = (Graphics2D) g;
if (isRolOver) {
Shape shape = new RoundRectangle2D.Double(1, 1, 86, 15, UIConstants.ARC, UIConstants.ARC);
GUIPaintUtils.paintBorderShadow(g2d, 3, shape, UIConstants.HOVER_BLUE, Color.WHITE);
@ -738,7 +739,7 @@ public class UICalendarPanel extends JPanel {
}
}
public void populate(Calendar calendar){
public void populate(Calendar calendar) {
this.hField.setValue(calendar.get(Calendar.HOUR_OF_DAY));
this.mField.setValue(calendar.get(Calendar.MINUTE));
this.sField.setValue(calendar.get(Calendar.SECOND));
@ -751,15 +752,15 @@ public class UICalendarPanel extends JPanel {
}
}
public static void main(String[] args){
public static void main(String[] args) {
JFrame frame = new JFrame();
UICalendarPanel calendarPanel = new UICalendarPanel();
final UITextField field = new UITextField();
field.setPreferredSize(new Dimension(120, 25));
calendarPanel.addDateChangeListener(new ChangeListener(){
public void stateChanged(ChangeEvent e){
Date selectedDate = (Date)e.getSource();
calendarPanel.addDateChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
Date selectedDate = (Date) e.getSource();
SimpleDateFormat f = new SimpleDateFormat("yyyy/MM/dd");
field.setText(f.format(selectedDate));
}

7
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,13 +27,13 @@ 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) {
setText(dayFormat.format(date));
} else {
setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Today")+":" + dateFormat.format(new Date()));
setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Today") + ":" + dateFormat.format(new Date()));
}
}

22
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());
}
@ -50,12 +53,12 @@ public class ReportletPane extends BasicPane {
centerPane.add(cardPane, BorderLayout.CENTER);
cardPane.setLayout(card = new CardLayout());
templateReportletTree = new TemplateFileTree();
IOFileNodeFilter filter = new IOFileNodeFilter(new String[]{".cpt", ".class",".frm",".form"});
IOFileNodeFilter filter = new IOFileNodeFilter(new String[]{".cpt", ".class", ".frm", ".form"});
templateReportletTree.setFileNodeFilter(filter);
cardPane.add(t_panel = new JScrollPane(templateReportletTree), "TEMPLATE");
classReportletTree = new ClassFileTree();
cardPane.add(c_panel = new JScrollPane(classReportletTree), "CLASS");
this.refreshEnv();
}
@ -75,8 +78,9 @@ public class ReportletPane extends BasicPane {
/**
* 检查是否符合规范
*
* @throws Exception 抛错
* @throws Exception 抛错
*/
@Override
public void checkValid() throws Exception {
String path = this.getSelectedReportletPath();
if (path == null) {
@ -89,7 +93,7 @@ public class ReportletPane extends BasicPane {
* 刷新Env
*/
public void refreshEnv() {
this.templateReportletTree.refreshEnv();
this.classReportletTree.refreshEnv();
}

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;

11
designer-base/src/main/resources/com/fr/design/images/m_web/connection_normal.svg

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="13px" viewBox="0 0 14 13" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>icon_定义数据连接_normal备份</title>
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="编组" transform="translate(-1.000000, -2.000000)" fill="#333334" fill-rule="nonzero">
<g id="Combined-Shape">
<path d="M13.9931545,2 C14.5492199,2 15,2.44371665 15,2.99980749 L15,6.00019251 C15,6.18235446 14.9510312,6.35313811 14.8654084,6.50022573 C14.9510251,6.64542671 15,6.81651267 15,6.99980749 L15,8.323 L13.9999505,7.11184475 L13.9999505,7.11184475 L14,6.99980749 L14,6.99980749 L13.676,6.999 L12.677,6 L13.9814047,6.00000045 C13.9891898,6.00000015 13.9931545,6 13.9931545,6 C13.9949083,6 13.9962286,5.72209937 13.9972169,5.33545502 L13.997985,4.98135981 C13.9981003,4.91922053 13.9982094,4.85584834 13.9983125,4.79173639 L13.9988633,4.40213303 C13.9989441,4.33703474 13.9990197,4.27218304 13.9990902,4.2080711 L14,2.99980749 L14,2.99980749 L2.00684547,3 L2.00684547,3 C2.00509174,3 2.00377141,3.27790063 2.00278313,3.66454498 L2.00201498,4.01864019 C2.00189972,4.08077947 2.00179065,4.14415166 2.00168746,4.20826361 L2.00113666,4.59786697 C2.00105585,4.66296526 2.00098034,4.72781696 2.00090983,4.7919289 L2.00000644,5.98367135 C2.00000205,5.99452107 2,6.00019251 2,6.00019251 L8.635,6 L7.636,6.999 L2.00684547,7 L2.00684547,7 C2.00509174,7 2.00377141,7.27790063 2.00278313,7.66454498 L2.00201498,8.01864019 C2.00189972,8.08077947 2.00179065,8.14415166 2.00168746,8.20826361 L2.00113666,8.59786697 C2.00105585,8.66296526 2.00098034,8.72781696 2.00090983,8.7919289 L2.00000644,9.98367135 C2.00000205,9.99452107 2,10.0001925 2,10.0001925 L5.75694924,10.0007296 C5.72425189,10.333731 5.73933308,10.670427 5.80214822,10.9998606 L2.00684547,11 L2.00684547,11 C2.00509174,11 2.00377141,11.2779006 2.00278313,11.664545 L2.00201498,12.0186402 C2.00189972,12.0807795 2.00179065,12.1441517 2.00168746,12.2082636 L2.00113666,12.597867 C2.00105585,12.6629653 2.00098034,12.727817 2.00090983,12.7919289 L2.00000644,13.9836714 C2.00000205,13.9945211 2,14.0001925 2,14.0001925 L5.121,14 L6.121,15 L2.00684547,15 C1.45078007,15 1,14.5562834 1,14.0001925 L1,10.9998075 C1,10.8176455 1.04896881,10.6468619 1.13459156,10.4997743 C1.04897491,10.3545733 1,10.1834873 1,10.0001925 L1,6.99980749 C1,6.81764554 1.04896881,6.64686189 1.13459156,6.49977427 C1.04897491,6.35457329 1,6.18348733 1,6.00019251 L1,2.99980749 C1,2.44762906 1.44994876,2 2.00684547,2 L13.9931545,2 Z M15,12.363 L15,14.0001925 C15,14.5523709 14.5500512,15 13.9931545,15 L11.974132,15.0005781 C12.3954832,14.8298301 12.7902338,14.5737273 13.131728,14.232233 L13.131728,14.232233 L13.363,14 L13.9814047,14.0000004 C13.9891898,14.0000002 13.9931545,14 13.9931545,14 C13.9948594,14 13.9961547,13.7373643 13.9971335,13.3675055 L15,12.363 Z M11.0104076,6.45405845 L11.7175144,7.16116524 L10.3033009,8.5753788 L12.4246212,10.6966991 L13.8388348,9.28248558 L14.5459415,9.98959236 L13.131728,11.4038059 L13.4852814,11.7573593 L12.0710678,13.1715729 C11.2900192,13.9526215 10.0216881,13.9506203 9.24411633,13.1730485 L8.8890873,12.8180195 L7.47487373,14.232233 L6.76776695,13.5251263 L8.18198052,12.1109127 L7.82695148,11.7558837 C7.04671787,10.9756501 7.04193321,9.7154261 7.82842712,8.92893219 L9.24264069,7.51471863 L9.59619408,7.86827202 L11.0104076,6.45405845 Z M9.24264069,8.92893219 L8.53553391,9.63603897 C8.14170149,10.0298714 8.14220916,10.6569278 8.53405826,11.0487769 L9.95122311,12.4659417 C10.3392305,12.8539491 10.9743965,12.8540307 11.363961,12.4644661 L12.0710678,11.7573593 L9.24264069,8.92893219 Z M4,4 L4,5 L3,5 L3,4 L4,4 Z M6,4 L6,5 L5,5 L5,4 L6,4 Z"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

13
designer-form/src/main/java/com/fr/design/designer/beans/LayoutAdapter.java

@ -42,6 +42,19 @@ public interface LayoutAdapter {
*/
boolean addBean(XCreator creator, int x, int y);
/**
* 组件的ComponentAdapter在添加组件时如果发现布局管理器不为空会继而调用该布局管理器的
* addComp方法来完成组件的具体添加在该方法内布局管理器可以提供额外的功能
*
* @param creator 被添加的新组件
* @param x 添加的位置x该位置是相对于container的
* @param y 添加的位置y该位置是相对于container的
* @param accept 是否添加新组件
* @return 是否添加成功成功返回true否则false
*/
boolean addBean(XCreator creator, int x, int y, boolean accept);
/**
* 组件的ComponentAdapter在添加组件时如果发现布局管理器不为空会继而调用该布局管理器的
* addComp方法来完成组件的具体添加在该方法内布局管理器可以提供额外的功能

435
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;
@ -41,14 +40,13 @@ 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 Background DEFAULTBG = new GradientBackground(new Color(247, 247, 247), new Color(210, 210, 210), GradientBackground.TOP2BOTTOM);
public final static Color DEFAULTFOREGROUNDCOLOR = Color.BLACK;
private Background bg;
private UILabel contentLabel;
private Background bg;
private UILabel contentLabel;
public XButton(Button widget, Dimension initSize) {
this(new FreeButton(widget),initSize);
this(new FreeButton(widget), initSize);
}
public XButton(FreeButton widget, Dimension initSize) {
@ -56,143 +54,146 @@ public class XButton extends XWidgetCreator {
}
public XButton(FormSubmitButton widget, Dimension initSize) {
super(widget, initSize);
super(widget, initSize);
}
public Background getContentBackground() {
return bg;
}
public Background getContentBackground() {
return bg;
}
public void setContentBackground(Background bg) {
this.bg = bg;
}
public void setContentBackground(Background bg) {
this.bg = bg;
}
public UILabel getContentLabel() {
return contentLabel;
}
public UILabel getContentLabel() {
return contentLabel;
}
public void setContentLabel(UILabel contentLabel) {
this.contentLabel = contentLabel;
}
public void setContentLabel(UILabel contentLabel) {
this.contentLabel = contentLabel;
}
/**
*根据下拉框选择返回按钮样式的默认设置或自定义设置列表
* @return 列表
* @throws IntrospectionException 抛错
* 根据下拉框选择返回按钮样式的默认设置或自定义设置列表
*
* @return 列表
* @throws IntrospectionException 抛错
*/
@Override
public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException {
CRPropertyDescriptor[] crp = ((FreeButton) data).isCustomStyle() ? getisCustomStyle() : getisnotCustomStyle();
return (CRPropertyDescriptor[]) ArrayUtils.addAll(super.supportedDescriptor(), crp);
}
protected CRPropertyDescriptor creatNonListenerStyle(int i) throws IntrospectionException{
CRPropertyDescriptor[] crPropertyDescriptors = {
new CRPropertyDescriptor("text", this.data.getClass()).setI18NName(
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Button_Name")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"),
new CRPropertyDescriptor("customStyle", this.data.getClass()).setI18NName(
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Button_Style")).setEditorClass(
ButtonTypeEditor.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"),
new CRPropertyDescriptor("initialBackground", this.data.getClass()).setEditorClass(
ImgBackgroundEditor.class).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Background_Initial")).putKeyValue(
XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"),
new CRPropertyDescriptor("overBackground", this.data.getClass()).setEditorClass(
ImgBackgroundEditor.class).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Background_Over")).putKeyValue(
XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"),
new CRPropertyDescriptor("clickBackground", this.data.getClass()).setEditorClass(
ImgBackgroundEditor.class).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Background_Click")).putKeyValue(
XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"),
new CRPropertyDescriptor("font", this.data.getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_FR_Font"))
.setEditorClass(FontEditor.class).setRendererClass(FontCellRenderer.class).putKeyValue(
XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"),
new CRPropertyDescriptor("iconName", this.data.getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Icon"))
.setEditorClass(IconEditor.class).setRendererClass(IconCellRenderer.class).putKeyValue(
XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"),
new CRPropertyDescriptor("hotkeys", this.data.getClass())
.setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Button_Hot_keys"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced")
.setEditorClass(ShortCutTextEditor.class)
};
@Override
public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException {
CRPropertyDescriptor[] crp = ((FreeButton) data).isCustomStyle() ? getisCustomStyle() : getisnotCustomStyle();
return (CRPropertyDescriptor[]) ArrayUtils.addAll(super.supportedDescriptor(), crp);
}
protected CRPropertyDescriptor creatNonListenerStyle(int i) throws IntrospectionException {
CRPropertyDescriptor[] crPropertyDescriptors = {
new CRPropertyDescriptor("text", this.data.getClass()).setI18NName(
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Button_Name")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"),
new CRPropertyDescriptor("customStyle", this.data.getClass()).setI18NName(
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Button_Style")).setEditorClass(
ButtonTypeEditor.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"),
new CRPropertyDescriptor("initialBackground", this.data.getClass()).setEditorClass(
ImgBackgroundEditor.class).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Background_Initial")).putKeyValue(
XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"),
new CRPropertyDescriptor("overBackground", this.data.getClass()).setEditorClass(
ImgBackgroundEditor.class).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Background_Over")).putKeyValue(
XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"),
new CRPropertyDescriptor("clickBackground", this.data.getClass()).setEditorClass(
ImgBackgroundEditor.class).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Background_Click")).putKeyValue(
XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"),
new CRPropertyDescriptor("font", this.data.getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_FR_Font"))
.setEditorClass(FontEditor.class).setRendererClass(FontCellRenderer.class).putKeyValue(
XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"),
new CRPropertyDescriptor("iconName", this.data.getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Icon"))
.setEditorClass(IconEditor.class).setRendererClass(IconCellRenderer.class).putKeyValue(
XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"),
new CRPropertyDescriptor("hotkeys", this.data.getClass())
.setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Button_Hot_keys"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced")
.setEditorClass(ShortCutTextEditor.class)
};
return crPropertyDescriptors[i];
}
protected CRPropertyDescriptor[] getisCustomStyle() throws IntrospectionException{
return new CRPropertyDescriptor[]{
creatNonListenerStyle(0) .setPropertyChangeListener(new PropertyChangeAdapter() {
@Override
public void propertyChange() {
setButtonText(((FreeButton) data).getText());
}
}),
creatNonListenerStyle(1) .setPropertyChangeListener(new PropertyChangeAdapter() {
@Override
public void propertyChange() {
checkButonType();
}
}),
creatNonListenerStyle(2).setPropertyChangeListener(
new PropertyChangeAdapter() {
@Override
public void propertyChange() {
bg = ((FreeButton) data).getInitialBackground();
}
}),
creatNonListenerStyle(3),
creatNonListenerStyle(4),
creatNonListenerStyle(5) .setPropertyChangeListener(
new PropertyChangeAdapter() {
@Override
public void propertyChange() {
FreeButton button = (FreeButton) data;
if (button.getFont() != null) {
contentLabel.setFont(button.getFont().applyResolutionNP(
FontTransformUtil.getDesignerFontResolution()));
contentLabel.setForeground(button.getFont().getForeground());
}
}
}),
creatNonListenerStyle(6),
creatNonListenerStyle(7)
};
}
protected CRPropertyDescriptor[] getisCustomStyle() throws IntrospectionException {
return new CRPropertyDescriptor[]{
creatNonListenerStyle(0).setPropertyChangeListener(new PropertyChangeAdapter() {
@Override
public void propertyChange() {
setButtonText(((FreeButton) data).getText());
}
}),
creatNonListenerStyle(1).setPropertyChangeListener(new PropertyChangeAdapter() {
@Override
public void propertyChange() {
checkButonType();
}
}),
creatNonListenerStyle(2).setPropertyChangeListener(
new PropertyChangeAdapter() {
@Override
public void propertyChange() {
bg = ((FreeButton) data).getInitialBackground();
}
}),
creatNonListenerStyle(3),
creatNonListenerStyle(4),
creatNonListenerStyle(5).setPropertyChangeListener(
new PropertyChangeAdapter() {
@Override
public void propertyChange() {
FreeButton button = (FreeButton) data;
if (button.getFont() != null) {
contentLabel.setFont(button.getFont().applyResolutionNP(
FontTransformUtil.getDesignerFontResolution()));
contentLabel.setForeground(button.getFont().getForeground());
}
}
}),
creatNonListenerStyle(6),
creatNonListenerStyle(7)
};
}
protected CRPropertyDescriptor[] getisnotCustomStyle() throws IntrospectionException {
return new CRPropertyDescriptor[]{
new CRPropertyDescriptor("text", this.data.getClass())
.setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Button_Name"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced")
.setPropertyChangeListener(new PropertyChangeAdapter() {
@Override
public void propertyChange() {
setButtonText(((FreeButton) data).getText());
}
}),
new CRPropertyDescriptor("customStyle", this.data.getClass()).setI18NName(
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Button_Style")).setEditorClass(
ButtonTypeEditor.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced")
.setPropertyChangeListener(new PropertyChangeAdapter() {
@Override
public void propertyChange() {
checkButonType();
}
}),
new CRPropertyDescriptor("iconName", this.data.getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Icon"))
.setEditorClass(IconEditor.class).setRendererClass(IconCellRenderer.class).putKeyValue(
XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"),
new CRPropertyDescriptor("hotkeys", this.data.getClass()).setI18NName(
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Button_Hot_keys"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced")
.setEditorClass(ShortCutTextEditor.class)
};
return new CRPropertyDescriptor[]{
new CRPropertyDescriptor("text", this.data.getClass())
.setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Button_Name"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced")
.setPropertyChangeListener(new PropertyChangeAdapter() {
@Override
public void propertyChange() {
setButtonText(((FreeButton) data).getText());
}
}),
new CRPropertyDescriptor("customStyle", this.data.getClass()).setI18NName(
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Button_Style")).setEditorClass(
ButtonTypeEditor.class).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced")
.setPropertyChangeListener(new PropertyChangeAdapter() {
@Override
public void propertyChange() {
checkButonType();
}
}),
new CRPropertyDescriptor("iconName", this.data.getClass()).setI18NName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Icon"))
.setEditorClass(IconEditor.class).setRendererClass(IconCellRenderer.class).putKeyValue(
XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced"),
new CRPropertyDescriptor("hotkeys", this.data.getClass()).setI18NName(
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Button_Hot_keys"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Basic_Advanced")
.setEditorClass(ShortCutTextEditor.class)
};
}
@Override
protected JComponent initEditor() {
if (editor == null) {
@ -202,110 +203,114 @@ public class XButton extends XWidgetCreator {
return editor;
}
protected UILabel initContentLabel() {
return new UILabel();
}
protected UILabel initContentLabel() {
return new UILabel();
}
@Override
public void paintComponent(Graphics g) {
super.paintComponent(g);
@Override
public void paintComponent(Graphics g) {
super.paintComponent(g);
//不可见时,按钮.4f透明
AlphaComposite composite = this.data.isVisible() ? (AlphaComposite)((Graphics2D)g).getComposite() : AlphaComposite.getInstance(AlphaComposite.SRC_OVER,HALF_OPACITY);
((Graphics2D)g).setComposite(composite);
Dimension panelSize = (contentLabel).getSize();
if(bg != null) {
bg.paint(g, new Rectangle2D.Double(0, 0, panelSize.getWidth(), panelSize.getHeight()));
}
}
public void setButtonText(String text) {
contentLabel.setText(text);
}
private void checkButonType() {
UILabel l = contentLabel;
FreeButton button = (FreeButton) data;
if (!button.isCustomStyle()) {
l.setBorder(BorderFactory.createLineBorder(new Color(148, 148, 148)));
bg = DEFAULTBG;
contentLabel.setFont(DEFAULTFT);
AlphaComposite composite = this.data.isVisible() ? (AlphaComposite) ((Graphics2D) g).getComposite() : AlphaComposite.getInstance(AlphaComposite.SRC_OVER, HALF_OPACITY);
((Graphics2D) g).setComposite(composite);
Dimension panelSize = (contentLabel).getSize();
if (bg != null) {
bg.paint(g, new Rectangle2D.Double(0, 0, panelSize.getWidth(), panelSize.getHeight()));
}
}
public void setButtonText(String text) {
contentLabel.setText(text);
}
private void checkButonType() {
UILabel l = contentLabel;
FreeButton button = (FreeButton) data;
if (!button.isCustomStyle()) {
l.setBorder(BorderFactory.createLineBorder(new Color(148, 148, 148)));
bg = DEFAULTBG;
contentLabel.setFont(DesignUtils.getDefaultGUIFont());
contentLabel.setForeground(DEFAULTFOREGROUNDCOLOR);
editor.setLayout(new BorderLayout());
editor.add(l, BorderLayout.CENTER);
} else {
l.setBorder(null);
editor.setLayout(new BorderLayout());
editor.add(l,BorderLayout.CENTER);
editor.add(l, BorderLayout.CENTER);
} else {
l.setBorder(null);
editor.setLayout(new BorderLayout());
editor.add(l, BorderLayout.CENTER);
if (button.getFont() != null) {
contentLabel.setFont(button.getFont().applyResolutionNP(
FontTransformUtil.getDesignerFontResolution()));
FontTransformUtil.getDesignerFontResolution()));
contentLabel.setForeground(button.getFont().getForeground());
}
l.setBounds(0, 0, button.getButtonWidth() == 0 ? this.getWidth() : button.getButtonWidth(), button
.getButtonHeight() == 0 ? this.getHeight() : button.getButtonHeight());
bg = button.getInitialBackground();
}
}
l.setBounds(0, 0, button.getButtonWidth() == 0 ? this.getWidth() : button.getButtonWidth(), button
.getButtonHeight() == 0 ? this.getHeight() : button.getButtonHeight());
bg = button.getInitialBackground();
}
}
@Override
protected void initXCreatorProperties() {
super.initXCreatorProperties();
checkButonType();
UILabel l = contentLabel;
FreeButton button = (FreeButton) data;
l.setText(button.getText());
if (button.isCustomStyle() && button.getFont() != null) {
l.setFont(button.getFont().applyResolutionNP(FontTransformUtil.getDesignerFontResolution()));
l.setForeground(button.getFont().getForeground());
}
l.setVerticalAlignment(SwingConstants.CENTER);
l.setHorizontalAlignment(SwingConstants.CENTER);
if (button.getButtonHeight() > 0 && button.getButtonWidth() > 0) {
this.setSize(button.getButtonWidth(), button.getButtonHeight());
l.setSize(button.getButtonWidth(), button.getButtonHeight());
XLayoutContainer parent;
if ((parent = XCreatorUtils.getParentXLayoutContainer(this)) instanceof XWAbsoluteLayout) {
((XWAbsoluteLayout) parent).toData().setBounds(toData(), getBounds());
}
}
l.setEnabled(button.isEnabled());
}
protected void initXCreatorProperties() {
super.initXCreatorProperties();
checkButonType();
UILabel l = contentLabel;
FreeButton button = (FreeButton) data;
l.setText(button.getText());
if (button.isCustomStyle() && button.getFont() != null) {
l.setFont(button.getFont().applyResolutionNP(FontTransformUtil.getDesignerFontResolution()));
l.setForeground(button.getFont().getForeground());
}
l.setVerticalAlignment(SwingConstants.CENTER);
l.setHorizontalAlignment(SwingConstants.CENTER);
if (button.getButtonHeight() > 0 && button.getButtonWidth() > 0) {
this.setSize(button.getButtonWidth(), button.getButtonHeight());
l.setSize(button.getButtonWidth(), button.getButtonHeight());
XLayoutContainer parent;
if ((parent = XCreatorUtils.getParentXLayoutContainer(this)) instanceof XWAbsoluteLayout) {
((XWAbsoluteLayout) parent).toData().setBounds(toData(), getBounds());
}
}
l.setEnabled(button.isEnabled());
}
/**
* 初始化按钮的Size
* @return 尺寸
*
* @return 尺寸
*/
public Dimension initEditorSize() {
FreeButton button = (FreeButton) data;
if (checkbutton(button)) {
return new Dimension(button.getButtonWidth(), button.getButtonHeight());
}
return super.initEditorSize();
}
private boolean checkbutton(FreeButton button){
return (button.isCustomStyle() && button.getButtonHeight() > 0 && button.getButtonWidth() > 0) ;
@Override
public Dimension initEditorSize() {
FreeButton button = (FreeButton) data;
if (checkbutton(button)) {
return new Dimension(button.getButtonWidth(), button.getButtonHeight());
}
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";
}
/**
* data属性改变触发其他操作
*
*/
public void firePropertyChange(){
FreeButton button = (FreeButton) data;
setButtonText(button.getText());
checkButonType();
if (button.getFont() != null) {
contentLabel.setFont(button.getFont().applyResolutionNP(
FontTransformUtil.getDesignerFontResolution()));
contentLabel.setForeground(button.getFont().getForeground());
}
}
/**
* data属性改变触发其他操作
*/
@Override
public void firePropertyChange() {
FreeButton button = (FreeButton) data;
setButtonText(button.getText());
checkButonType();
if (button.getFont() != null) {
contentLabel.setFont(button.getFont().applyResolutionNP(
FontTransformUtil.getDesignerFontResolution()));
contentLabel.setForeground(button.getFont().getForeground());
}
}
}

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

@ -1,50 +1,48 @@
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
*/
@Deprecated
public class RadioDefinePane extends AbstractDataModify<Radio> {
public RadioDefinePane(XCreator xCreator) {
super(xCreator);
iniComoponents();
}
private void iniComoponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
UILabel infoLabel = new UILabel();
FRFont frFont = FRContext.getDefaultValues().getFRFont();
infoLabel.setFont(new Font(frFont.getFamily(), Font.BOLD, 24));
infoLabel.setText(com.fr.design.i18n.Toolkit.i18nText(
"Fine-Design_Report_No_Editor_Property_Definition") + ".");
infoLabel.setHorizontalAlignment(SwingConstants.CENTER);
this.add(infoLabel, BorderLayout.CENTER);
}
@Override
public String title4PopupWindow() {
return "radio";
}
@Override
public void populateBean(Radio cellWidget) {
}
@Override
public Radio updateBean() {
return (Radio)creator.toData();
}
public RadioDefinePane(XCreator xCreator) {
super(xCreator);
iniComoponents();
}
private void iniComoponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
UILabel infoLabel = new UILabel();
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);
this.add(infoLabel, BorderLayout.CENTER);
}
@Override
public String title4PopupWindow() {
return "radio";
}
@Override
public void populateBean(Radio cellWidget) {
}
@Override
public Radio updateBean() {
return (Radio) creator.toData();
}
}

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时动态更新按钮

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

@ -1,48 +1,46 @@
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
*/
@Deprecated
public class RadioDefinePane extends AbstractDataModify<Radio> {
public RadioDefinePane() {
this.iniComoponents();
}
private void iniComoponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
UILabel infoLabel = new UILabel();
FRFont frFont = FRContext.getDefaultValues().getFRFont();
infoLabel.setFont(new Font(frFont.getFamily(), Font.BOLD, 24));
infoLabel.setText(com.fr.design.i18n.Toolkit.i18nText(
"Fine-Design_Report_No_Editor_Property_Definition") + ".");
infoLabel.setHorizontalAlignment(SwingConstants.CENTER);
this.add(infoLabel, BorderLayout.CENTER);
}
@Override
protected String title4PopupWindow() {
return "radio";
}
@Override
public void populateBean(Radio cellWidget) {
}
@Override
public Radio updateBean() {
return new Radio();
}
public RadioDefinePane() {
this.iniComoponents();
}
private void iniComoponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
UILabel infoLabel = new UILabel();
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);
this.add(infoLabel, BorderLayout.CENTER);
}
@Override
protected String title4PopupWindow() {
return "radio";
}
@Override
public void populateBean(Radio cellWidget) {
}
@Override
public Radio updateBean() {
return new Radio();
}
}

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