Browse Source

REPORT-55696 国际化-远程版本不一致的提示弹窗在非中文下显示不全 && REPORT-55415 富文本框,鼠标选择不同的字体,会导致所选字体都变成一样的

feature/10.0
Henry.Wang 3 years ago
parent
commit
9cca8d7671
  1. 12
      designer-base/src/main/java/com/fr/design/dialog/NotificationDialog.java
  2. 3
      designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java
  3. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties
  4. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties
  5. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties
  6. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties
  7. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties
  8. 6
      designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java

12
designer-base/src/main/java/com/fr/design/dialog/NotificationDialog.java

@ -3,6 +3,7 @@ package com.fr.design.dialog;
import com.fr.concurrent.NamedThreadFactory; import com.fr.concurrent.NamedThreadFactory;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
@ -10,6 +11,7 @@ import com.fr.design.notification.Notification;
import com.fr.design.notification.NotificationCenter; import com.fr.design.notification.NotificationCenter;
import com.fr.module.ModuleContext; import com.fr.module.ModuleContext;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;
import java.awt.Dimension; import java.awt.Dimension;
@ -40,9 +42,17 @@ public class NotificationDialog extends JDialog {
private UILabel messageText; private UILabel messageText;
private NotificationDialogAction notificationDialogAction; private NotificationDialogAction notificationDialogAction;
private ScheduledExecutorService TIMER; private ScheduledExecutorService TIMER;
private Dimension dialogSize = new Dimension(230, 95);
public NotificationDialog(Frame owner, String title, boolean isModal, int messageType, String message, NotificationDialogAction action) { public NotificationDialog(Frame owner, String title, boolean isModal, int messageType, String message, NotificationDialogAction action) {
this(owner, title, isModal, messageType, message, action, null);
}
public NotificationDialog(Frame owner, String title, boolean isModal, int messageType, String message, NotificationDialogAction action, Dimension dimension) {
super(owner); super(owner);
if (dimension != null) {
this.dialogSize = dimension;
}
setTitle(title); setTitle(title);
initComponents(StringUtils.EMPTY, messageType, message, isModal, action); initComponents(StringUtils.EMPTY, messageType, message, isModal, action);
} }
@ -77,7 +87,7 @@ public class NotificationDialog extends JDialog {
JScrollPane jScrollPane = new JScrollPane(messageText, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); JScrollPane jScrollPane = new JScrollPane(messageText, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPane.setBorder(BorderFactory.createEmptyBorder()); jScrollPane.setBorder(BorderFactory.createEmptyBorder());
centerPanel.add(jScrollPane, BorderLayout.CENTER); centerPanel.add(jScrollPane, BorderLayout.CENTER);
centerPanel.setPreferredSize(new Dimension(230, 95)); centerPanel.setPreferredSize(dialogSize);
body.add(centerPanel, BorderLayout.CENTER); body.add(centerPanel, BorderLayout.CENTER);
//查看详情 //查看详情

3
designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java

@ -7,6 +7,7 @@ import com.fr.design.dialog.NotificationDialogAction;
import com.fr.design.env.DesignerWorkspaceInfo; import com.fr.design.env.DesignerWorkspaceInfo;
import com.fr.design.env.DesignerWorkspaceType; import com.fr.design.env.DesignerWorkspaceType;
import com.fr.design.env.RemoteWorkspace; import com.fr.design.env.RemoteWorkspace;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.env.CheckServiceDialog; import com.fr.env.CheckServiceDialog;
@ -107,7 +108,7 @@ public class VersionCheckUtils {
CheckServiceDialog checkServiceDialog = new CheckServiceDialog(DesignerContext.getDesignerFrame(), GeneralUtils.readFullBuildNO(), getRemoteBranch(envName), getNoExistServiceDescription(envName)); CheckServiceDialog checkServiceDialog = new CheckServiceDialog(DesignerContext.getDesignerFrame(), GeneralUtils.readFullBuildNO(), getRemoteBranch(envName), getNoExistServiceDescription(envName));
checkServiceDialog.setVisible(true); checkServiceDialog.setVisible(true);
} }
}); },DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.version.check.dialog"));
notificationDialog.setVisible(true); notificationDialog.setVisible(true);
} }

1
designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties

@ -4,3 +4,4 @@ com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=630*31
com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=630*280 com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=630*280
com.fr.design.report.ReportColumnsPane=800*600 com.fr.design.report.ReportColumnsPane=800*600
com.fr.env.RemoteEnvPane.dialog=458*132 com.fr.env.RemoteEnvPane.dialog=458*132
com.fr.design.version.check.dialog=490*95

1
designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties

@ -3,3 +3,4 @@ com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=610*185
com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=610*31 com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=610*31
com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=610*280 com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=610*280
com.fr.env.RemoteEnvPane.dialog=458*132 com.fr.env.RemoteEnvPane.dialog=458*132
com.fr.design.version.check.dialog=430*95

1
designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties

@ -3,3 +3,4 @@ com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=490*185
com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=490*35 com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=490*35
com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=490*280 com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=490*280
com.fr.env.RemoteEnvPane.dialog=458*132 com.fr.env.RemoteEnvPane.dialog=458*132
com.fr.design.version.check.dialog=450*95

1
designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties

@ -4,3 +4,4 @@ com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=385*185
com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=385*31 com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=385*31
com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=385*280 com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=385*280
com.fr.env.RemoteEnvPane.dialog=308*132 com.fr.env.RemoteEnvPane.dialog=308*132
com.fr.design.version.check.dialog=230*95

1
designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties

@ -3,3 +3,4 @@ com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=385*185
com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=385*31 com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=385*31
com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=385*280 com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=385*280
com.fr.env.RemoteEnvPane.dialog=308*132 com.fr.env.RemoteEnvPane.dialog=308*132
com.fr.design.version.check.dialog=230*95

6
designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java

@ -334,11 +334,13 @@ public class RichTextToolBar extends BasicPane{
@Override @Override
public void itemStateChanged(ItemEvent e) { public void itemStateChanged(ItemEvent e) {
String fontName = (String) RichTextToolBar.this.fontNameComboBox.getSelectedItem(); String fontName = (String) RichTextToolBar.this.fontNameComboBox.getSelectedItem();
if (fontName != null) {
// 调用setCharacterAttributes函数设置文本区选择文本的字体 // 调用setCharacterAttributes函数设置文本区选择文本的字体
MutableAttributeSet attr = new SimpleAttributeSet(); MutableAttributeSet attr = new SimpleAttributeSet();
StyleConstants.setFontFamily(attr, fontName); StyleConstants.setFontFamily(attr, fontName);
setCharacterAttributes(RichTextToolBar.this.textPane, attr, false); setCharacterAttributes(RichTextToolBar.this.textPane, attr, false);
} }
}
}; };
private ActionListener formulaActionListener = new ActionListener() { private ActionListener formulaActionListener = new ActionListener() {
@ -402,6 +404,10 @@ public class RichTextToolBar extends BasicPane{
fontSize_1st = (Integer) attrs.getAttribute(StyleConstants.FontSize); fontSize_1st = (Integer) attrs.getAttribute(StyleConstants.FontSize);
fontColor_1st = (Color) attrs.getAttribute(StyleConstants.Foreground); fontColor_1st = (Color) attrs.getAttribute(StyleConstants.Foreground);
fontColor_1st = fontColor_1st == null ? Color.BLACK : fontColor_1st; fontColor_1st = fontColor_1st == null ? Color.BLACK : fontColor_1st;
} else {
if (!(attrs.getAttribute(StyleConstants.FontFamily)).equals(fontName_1st)) {
fontName_1st = null;
}
} }
} }

Loading…
Cancel
Save