Browse Source

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

* commit '9cf4ae7f90d97a680e852b19faaca104f18f0d17':
  REPORT-54643 最新的persist分支安装设计器内存监控安装失败且会导致面板无法编辑  漏传代码
  REPORT-54643 最新的persist分支安装设计器内存监控安装失败且会导致面板无法编辑
  REPORT-54643  回退
  REPORT-54643  回退
  REPORT-54643 最新的persist分支安装设计器内存监控安装失败且会导致面板无法编辑
  REPORT-54643 最新的persist分支安装设计器内存监控安装失败且会导致面板无法编辑
  REPORT-53902 远程设计无权限国际化显示不全
  REPORT-54545 富文本默认字体本地化问题
  REPORT-54574 远程设计环境不一致提示内容中,性能插件下的六个包被分别识别为了插件
bugfix/10.0
superman 3 years ago
parent
commit
e84969c3c0
  1. 19
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  2. 84
      designer-base/src/main/java/com/fr/design/mainframe/SafeWindowListener.java
  3. 19
      designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java
  4. 3
      designer-base/src/main/java/com/fr/env/RemoteEnvPane.java
  5. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties
  6. 3
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties
  7. 3
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties
  8. 3
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties
  9. 3
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties
  10. 12
      designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java

19
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

@ -72,6 +72,8 @@ import com.fr.start.OemHandler;
import com.fr.workspace.WorkContext;
import com.fr.workspace.Workspace;
import com.fr.workspace.connect.WorkspaceConnectionInfo;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
import org.jetbrains.annotations.Nullable;
@ -179,6 +181,8 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
private int contentHeight = (int) (java.awt.Toolkit.getDefaultToolkit().getScreenSize().getHeight());
private Map<WindowListener, SafeWindowListener> map = new HashMap<>();
private WindowAdapter windowAdapter = new WindowAdapter() {
@Override
@ -535,6 +539,21 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
}
}
@Override
public synchronized void addWindowListener(WindowListener l) {
SafeWindowListener safeWindowListener = new SafeWindowListener(l);
map.put(l, safeWindowListener);
super.addWindowListener(safeWindowListener);
}
@Override
public synchronized void removeWindowListener(WindowListener l) {
SafeWindowListener safeWindowListener = map.remove(l);
if (safeWindowListener != null) {
super.removeWindowListener(safeWindowListener);
}
}
private void addMacOsListener() {
OSSupportCenter.buildAction(new MacOsAddListenerAction(), SupportOSImpl.DOCK_QUIT);
}

84
designer-base/src/main/java/com/fr/design/mainframe/SafeWindowListener.java

@ -0,0 +1,84 @@
package com.fr.design.mainframe;
import com.fr.log.FineLoggerFactory;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
/**
* 保证监听运行出错也不影响其他功能正常使用
*
* @author hades
* @version 10.0
* Created by hades on 2021/6/30
*/
public class SafeWindowListener implements WindowListener {
private final WindowListener windowListener;
public SafeWindowListener(WindowListener windowListener) {
this.windowListener = windowListener;
}
@Override
public void windowOpened(WindowEvent e) {
try {
windowListener.windowOpened(e);
} catch (Throwable throwable) {
FineLoggerFactory.getLogger().debug(throwable.getMessage(), throwable);
}
}
@Override
public void windowClosing(WindowEvent e) {
try {
windowListener.windowClosing(e);
} catch (Throwable throwable) {
FineLoggerFactory.getLogger().debug(throwable.getMessage(), throwable);
}
}
@Override
public void windowClosed(WindowEvent e) {
try {
windowListener.windowClosed(e);
} catch (Throwable throwable) {
FineLoggerFactory.getLogger().debug(throwable.getMessage(), throwable);
}
}
@Override
public void windowIconified(WindowEvent e) {
try {
windowListener.windowIconified(e);
} catch (Throwable throwable) {
FineLoggerFactory.getLogger().debug(throwable.getMessage(), throwable);
}
}
@Override
public void windowDeiconified(WindowEvent e) {
try {
windowListener.windowDeiconified(e);
} catch (Throwable throwable) {
FineLoggerFactory.getLogger().debug(throwable.getMessage(), throwable);
}
}
@Override
public void windowActivated(WindowEvent e) {
try {
windowListener.windowActivated(e);
} catch (Throwable throwable) {
FineLoggerFactory.getLogger().debug(throwable.getMessage(), throwable);
}
}
@Override
public void windowDeactivated(WindowEvent e) {
try {
windowListener.windowDeactivated(e);
} catch (Throwable throwable) {
FineLoggerFactory.getLogger().debug(throwable.getMessage(), throwable);
}
}
}

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

@ -39,6 +39,7 @@ import java.lang.reflect.Method;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
@ -59,6 +60,21 @@ public class VersionCheckUtils {
private static final String ID = "id";
private static final String VERSION = "version";
private static final String NAME = "name";
private static final Set<String> pluginsNeedIgnore = new HashSet<>();
static {
pluginsNeedIgnore.addAll(Arrays.asList(
"com.fr.plugin.performance.newexecutetool",
"com.fr.plugin.performance.newline",
"com.fr.plugin.performance.pdfstream",
"com.fr.plugin.performance.dzstartemptyfile",
"com.fr.plugin.performance.treenode.button.optimization",
"com.fr.plugin.performance.druid",
"com.fr.plugin.performance.reducecalculation",
"com.fr.plugin.performance.fasttree",
"com.fr.plugin.performance.paralleldsloader",
"com.fr.plugin.cloud.analytics.v10"
));
}
public static boolean versionCheck(String envName) {
@ -236,6 +252,9 @@ public class VersionCheckUtils {
continue;
}
String remotePluginID = remotePlugin.getString(ID);
if (pluginsNeedIgnore.contains(remotePluginID)) {
continue;
}
if (localPluginsMap.containsKey(remotePluginID)) {
if (ComparatorUtils.equals(localPluginsMap.get(remotePluginID).getVersion(), remotePlugin.getString(VERSION))) {
continue;

3
designer-base/src/main/java/com/fr/env/RemoteEnvPane.java vendored

@ -15,6 +15,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ipasswordfield.UIPassWordField;
import com.fr.design.gui.ipasswordfield.UIPasswordFieldWithFixedLength;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayoutHelper;
@ -653,7 +654,7 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
dialog = new JDialog((Dialog) SwingUtilities.getWindowAncestor(RemoteEnvPane.this), Toolkit.i18nText("Fine-Design_Basic_Dialog_Message_Title"), true);
dialog.setSize(new Dimension(308, 132));
dialog.setSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.env.RemoteEnvPane.dialog"));
okButton.setEnabled(false);
JPanel jp = new JPanel();
JPanel upPane = new JPanel();

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

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

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

@ -1,4 +1,5 @@
com.fr.design.mainframe.check.CheckButton=280*118
com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=610*185
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

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

@ -1,4 +1,5 @@
com.fr.design.mainframe.check.CheckButton=230*118
com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=490*185
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

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

@ -2,4 +2,5 @@
com.fr.design.mainframe.check.CheckButton=250*118
com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=385*185
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

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

@ -1,4 +1,5 @@
com.fr.design.mainframe.check.CheckButton=250*118
com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=385*185
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

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

@ -5,6 +5,7 @@ package com.fr.design.cell.editor;
import com.fr.base.BaseFormula;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.base.Utils;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter;
@ -61,6 +62,11 @@ public class RichTextToolBar extends BasicPane{
private static final Dimension BUTTON_SIZE = new Dimension(24, 20);
/**
* 富文本字体下拉框默认首选字体 非设计器UI界面字体
*/
private static final FRFont DEFAULT_FONT = FRContext.getDefaultValues().getFRFont().applySize(13);
private UIComboBox fontNameComboBox;
private UIComboBox fontSizeComboBox;
private UIToggleButton bold;
@ -153,11 +159,11 @@ public class RichTextToolBar extends BasicPane{
}
private void bindListener(){
FRFont defaultFont = (this.textPane != null) ? FRFont.getInstance(this.textPane.getFont()) : RichTextPane.DEFAUL_FONT;
// 这里下拉框默认选中字体 不由UI界面字体决定 两套不同体系
fontNameComboBox.addItemListener(fontNameItemListener);
fontNameComboBox.setSelectedItem(defaultFont.getFamily());
fontNameComboBox.setSelectedItem(DEFAULT_FONT.getFamily());
fontSizeComboBox.addItemListener(fontSizeItemListener);
fontSizeComboBox.setSelectedItem(scaleDown(defaultFont.getSize()));
fontSizeComboBox.setSelectedItem(scaleDown(DEFAULT_FONT.getSize()));
bold.addActionListener(blodChangeAction);
italic.addActionListener(itaChangeAction);

Loading…
Cancel
Save