Browse Source

Merge pull request #4937 in DESIGN/design from final/10.0 to persist/10.0

* commit '8da7dfdb347cb585903c7093ef6a353b13694365': (25 commits)
  无jira任务,屏蔽一下功能,不在维护版本发布
  CHART-19834 svg地图报错
  REPORT-54834    拖动进入导致没有重置的标志位
  REPORT-54604 参数面板放置默认不可见的预定义控件后,修改控件属性,控件在参数面板丢失显示
  REPORT-54844 jar包相同情况下,同步插件时同步按钮一直没灰化
  REPORT-54817 内网环境下该迭代功能应当不生效
  REPORT-53699 更改监听BeforeAllStop事件
  REPORT-54438 单元格属性设置面板 在切换参数面板编辑后 面板未刷新
  REPORT-54716 决策报表中修改组件名为大写,提示重名
  REPORT-54716 决策报表中修改组件名为大写,提示重名
  REPORT-53762 插件登录和短信登录平台,使用的是http协议,需要修改
  REPORT-53614 远程环境检测及同步-同步jar时有问题
  REPORT-54643 最新的persist分支安装设计器内存监控安装失败且会导致面板无法编辑  漏传代码
  REPORT-54643 最新的persist分支安装设计器内存监控安装失败且会导致面板无法编辑
  REPORT-54643  回退
  REPORT-53699 启动设计器时模板提示插件未启用
  REPORT-54573  设计器本地预览报错400请求头过大
  REPORT-54643 最新的persist分支安装设计器内存监控安装失败且会导致面板无法编辑
  REPORT-54486 数据集-数据连接中,主机名有\的情况没有适配
  REPORT-54486 数据集-数据连接中,主机名有\的情况没有适配
  ...
persist/10.0 10.0.17.2021.07.12
superman 4 years ago
parent
commit
16eebf7c99
  1. 4
      designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java
  2. 35
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java
  3. 4
      designer-base/src/main/java/com/fr/design/editor/editor/Editor.java
  4. 6
      designer-base/src/main/java/com/fr/design/gui/ipasswordfield/UIPasswordFieldWithFixedLength.java
  5. 4
      designer-base/src/main/java/com/fr/design/locale/impl/BbsRegisterMark.java
  6. 4
      designer-base/src/main/java/com/fr/design/locale/impl/BbsResetMark.java
  7. 4
      designer-base/src/main/java/com/fr/design/login/AbstractDesignerSSO.java
  8. 6
      designer-base/src/main/java/com/fr/design/login/guide/DesignerGuideHelper.java
  9. 3
      designer-base/src/main/java/com/fr/design/login/message/DesignerMessageHelper.java
  10. 19
      designer-base/src/main/java/com/fr/design/login/utils/DesignerLoginUtils.java
  11. 15
      designer-base/src/main/java/com/fr/design/mainframe/OpenLoadingPane.java
  12. 4
      designer-base/src/main/java/com/fr/env/CheckServiceDialog.java
  13. 3
      designer-base/src/main/java/com/fr/env/RemoteEnvPane.java
  14. 15
      designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java
  15. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties
  16. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties
  17. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties
  18. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties
  19. 1
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties
  20. BIN
      designer-base/src/main/resources/com/fr/design/images/mainframe/openloading.png
  21. 1
      designer-form/src/main/java/com/fr/design/designer/creator/XNameWidget.java
  22. 8
      designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java
  23. 12
      designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java
  24. 22
      designer-realize/src/main/java/com/fr/design/mainframe/app/DesignerAppUtils.java
  25. 2
      designer-realize/src/main/java/com/fr/start/module/DesignerInitActivator.java

4
designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java

@ -52,8 +52,8 @@ public class JDBCDefPane extends JPanel {
public static final String DRIVER_TYPE = "driver_type"; public static final String DRIVER_TYPE = "driver_type";
public static final String USER_NAME = "user_name"; public static final String USER_NAME = "user_name";
private static final String OTHER_DB = "Others"; private static final String OTHER_DB = "Others";
private static final Pattern ORACLE_URL = Pattern.compile("^jdbc:oracle:thin:@[/]*([-0-9a-zA-Z_\\.]+)(:([0-9]+|port))?([:/](.*))?.*", Pattern.CASE_INSENSITIVE); private static final Pattern ORACLE_URL = Pattern.compile("^jdbc:oracle:thin:@[/]*([-0-9a-zA-Z_\\.\\\\]+)(:([0-9]+|port))?([:/](.*))?.*", Pattern.CASE_INSENSITIVE);
private static final Pattern GENERAL_URL = Pattern.compile("^jdbc:(mysql|sqlserver|db2|derby|postgresql|inceptor|inceptor2|hive2)://([-0-9a-zA-Z_\\.]+)(:([0-9]+|port))?((/|;DatabaseName=)(.*))?.*", Pattern.CASE_INSENSITIVE); private static final Pattern GENERAL_URL = Pattern.compile("^jdbc:(mysql|sqlserver|db2|derby|postgresql|inceptor|inceptor2|hive2)://([-0-9a-zA-Z_\\.\\\\]+)(:([0-9]+|port))?((/|;DatabaseName=)(.*))?.*", Pattern.CASE_INSENSITIVE);
private static final Pattern PORT = Pattern.compile("^0$|^[1-9][\\d]*[\\d]*$"); private static final Pattern PORT = Pattern.compile("^0$|^[1-9][\\d]*[\\d]*$");
private static final Pattern CHAR_NEED_ESCAPE = Pattern.compile("[?|$^*\\\\\\[\\](){}.+]"); private static final Pattern CHAR_NEED_ESCAPE = Pattern.compile("[?|$^*\\\\\\[\\](){}.+]");
// 编码转换. // 编码转换.

35
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java

@ -4,7 +4,6 @@ import com.fr.base.Parameter;
import com.fr.data.impl.ClassTableData; import com.fr.data.impl.ClassTableData;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.formula.JavaEditorPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itableeditorpane.ParameterTableModel; import com.fr.design.gui.itableeditorpane.ParameterTableModel;
@ -15,14 +14,18 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.script.Calculator; import com.fr.script.Calculator;
import com.fr.stable.ParameterProvider; import com.fr.stable.ParameterProvider;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
import javax.swing.*; import javax.swing.BorderFactory;
import java.awt.*; import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dialog;
import java.awt.Dimension;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
@ -65,30 +68,6 @@ public class ClassTableDataPane extends AbstractTableDataPane<ClassTableData> {
dlg.setVisible(true); dlg.setVisible(true);
} }
}); });
UIButton editButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Edit"));
editButton.setPreferredSize(new Dimension(
editButton.getPreferredSize().width,
classNameTextField.getPreferredSize().height));
reportletNamePane.add(editButton);
editButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
final JavaEditorPane javaEditorPane = new JavaEditorPane(classNameTextField.getText(), JavaEditorPane.DEFAULT_TABLEDATA_STRING);
final BasicDialog dlg = javaEditorPane.showMediumWindow(SwingUtilities.getWindowAncestor(ClassTableDataPane.this),
new DialogActionAdapter() {
public void doOk() {
classNameTextField.setText(javaEditorPane.getClassText());
}
});
javaEditorPane.addSaveActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
dlg.doOK();
}
});
dlg.setVisible(true);
}
});
Component[][] components = { Component[][] components = {
{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Class_Name") + ":"), reportletNamePane}, {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Class_Name") + ":"), reportletNamePane},

4
designer-base/src/main/java/com/fr/design/editor/editor/Editor.java

@ -4,6 +4,7 @@
package com.fr.design.editor.editor; package com.fr.design.editor.editor;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
@ -34,6 +35,9 @@ public abstract class Editor<T> extends JComponent {
// 约定图片的文件名为this.getName(),处理起来方便些 // 约定图片的文件名为this.getName(),处理起来方便些
// b:这里国际化没有考虑 // b:这里国际化没有考虑
public Icon getIcon() { public Icon getIcon() {
if (StringUtils.isEmpty(this.getIconName())) {
return null;
}
String iconName = "com/fr/design/images/buttonicon/" + this.getIconName() + ".png"; String iconName = "com/fr/design/images/buttonicon/" + this.getIconName() + ".png";
try { try {
return BaseUtils.readIcon(iconName); return BaseUtils.readIcon(iconName);

6
designer-base/src/main/java/com/fr/design/gui/ipasswordfield/UIPasswordFieldWithFixedLength.java

@ -70,6 +70,12 @@ public class UIPasswordFieldWithFixedLength extends UIPassWordField {
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
UIPasswordFieldWithFixedLength.this.clearPassword = true; UIPasswordFieldWithFixedLength.this.clearPassword = true;
} }
@Override
public void mousePressed(MouseEvent e) {
// 防止拖动进入
UIPasswordFieldWithFixedLength.this.clearPassword = true;
}
}); });
this.addKeyListener(new KeyAdapter() { this.addKeyListener(new KeyAdapter() {
@Override @Override

4
designer-base/src/main/java/com/fr/design/locale/impl/BbsRegisterMark.java

@ -16,8 +16,8 @@ import java.util.Map;
public class BbsRegisterMark implements LocaleMark<String> { public class BbsRegisterMark implements LocaleMark<String> {
private final Map<Locale, String> map = new HashMap<>(); private final Map<Locale, String> map = new HashMap<>();
private static final String BBS_REGISTER_CN = CloudCenter.getInstance().acquireUrlByKind("bbs.register", "http://id.fanruan.com/register/register.php?clueSource=activityfr"); private static final String BBS_REGISTER_CN = CloudCenter.getInstance().acquireUrlByKind("bbs.register", "https://id.fanruan.com/register/register.php?clueSource=activityfr");
private static final String BBS_REGISTER_TW = CloudCenter.getInstance().acquireUrlByKind("bbs.register", "http://id.fanruan.com/register/register.php?clueSource=activityfr"); private static final String BBS_REGISTER_TW = CloudCenter.getInstance().acquireUrlByKind("bbs.register", "https://id.fanruan.com/register/register.php?clueSource=activityfr");
private static final String BBS_REGISTER_EN = CloudCenter.getInstance().acquireUrlByKind("bbs.register.en_US", "https://id.fanruan.com/en/register/register.php"); private static final String BBS_REGISTER_EN = CloudCenter.getInstance().acquireUrlByKind("bbs.register.en_US", "https://id.fanruan.com/en/register/register.php");
private static final String BBS_REGISTER_KR = CloudCenter.getInstance().acquireUrlByKind("bbs.register.en_US", "https://id.fanruan.com/en/register/register.php"); private static final String BBS_REGISTER_KR = CloudCenter.getInstance().acquireUrlByKind("bbs.register.en_US", "https://id.fanruan.com/en/register/register.php");
private static final String BBS_REGISTER_JP = CloudCenter.getInstance().acquireUrlByKind("bbs.register.en_US", "https://id.fanruan.com/en/register/register.php"); private static final String BBS_REGISTER_JP = CloudCenter.getInstance().acquireUrlByKind("bbs.register.en_US", "https://id.fanruan.com/en/register/register.php");

4
designer-base/src/main/java/com/fr/design/locale/impl/BbsResetMark.java

@ -16,8 +16,8 @@ import java.util.Map;
public class BbsResetMark implements LocaleMark<String> { public class BbsResetMark implements LocaleMark<String> {
private final Map<Locale, String> map = new HashMap<>(); private final Map<Locale, String> map = new HashMap<>();
private static final String BBS_RESET_CN = CloudCenter.getInstance().acquireUrlByKind("bbs.reset", "http://id.fanruan.com/forget/forget.php?clue=activityfr"); private static final String BBS_RESET_CN = CloudCenter.getInstance().acquireUrlByKind("bbs.reset", "https://id.fanruan.com/forget/forget.php?clue=activityfr");
private static final String BBS_RESET_TW = CloudCenter.getInstance().acquireUrlByKind("bbs.reset", "http://id.fanruan.com/forget/forget.php?clue=activityfr"); private static final String BBS_RESET_TW = CloudCenter.getInstance().acquireUrlByKind("bbs.reset", "https://id.fanruan.com/forget/forget.php?clue=activityfr");
private static final String BBS_RESET_EN = CloudCenter.getInstance().acquireUrlByKind("bbs.reset.en_US", "https://id.fanruan.com/en/forget/forget.php"); private static final String BBS_RESET_EN = CloudCenter.getInstance().acquireUrlByKind("bbs.reset.en_US", "https://id.fanruan.com/en/forget/forget.php");
private static final String BBS_RESET_KR = CloudCenter.getInstance().acquireUrlByKind("bbs.reset.en_US", "https://id.fanruan.com/en/forget/forget.php"); private static final String BBS_RESET_KR = CloudCenter.getInstance().acquireUrlByKind("bbs.reset.en_US", "https://id.fanruan.com/en/forget/forget.php");
private static final String BBS_RESET_JP = CloudCenter.getInstance().acquireUrlByKind("bbs.reset.en_US", "https://id.fanruan.com/en/forget/forget.php"); private static final String BBS_RESET_JP = CloudCenter.getInstance().acquireUrlByKind("bbs.reset.en_US", "https://id.fanruan.com/en/forget/forget.php");

4
designer-base/src/main/java/com/fr/design/login/AbstractDesignerSSO.java

@ -20,6 +20,10 @@ public abstract class AbstractDesignerSSO extends UpdateAction {
@Override @Override
public void actionPerformed(ActionEvent event) { public void actionPerformed(ActionEvent event) {
String url = getJumpUrl(); String url = getJumpUrl();
if (!DesignerLoginUtils.isOnline()) {
BrowseUtils.browser(url);
return;
}
DesignerEnvManager manager = DesignerEnvManager.getEnvManager(); DesignerEnvManager manager = DesignerEnvManager.getEnvManager();
int uid = manager.getDesignerLoginUid(); int uid = manager.getDesignerLoginUid();
if (uid > 0) { if (uid > 0) {

6
designer-base/src/main/java/com/fr/design/login/guide/DesignerGuideHelper.java

@ -4,9 +4,13 @@ import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.dialog.UIDialog; import com.fr.design.dialog.UIDialog;
import com.fr.design.event.DesignerOpenedListener; import com.fr.design.event.DesignerOpenedListener;
import com.fr.design.login.utils.DesignerLoginUtils;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.os.impl.SupportOSImpl; import com.fr.design.os.impl.SupportOSImpl;
import com.fr.design.update.push.DesignerPushUpdateManager; import com.fr.design.update.push.DesignerPushUpdateManager;
import com.fr.general.CloudCenter;
import com.fr.general.CloudCenterConfig;
import com.fr.general.http.HttpToolbox;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.WindowConstants; import javax.swing.WindowConstants;
@ -35,7 +39,7 @@ public class DesignerGuideHelper {
public static void prepareShowGuideDialog() { public static void prepareShowGuideDialog() {
// 如果存在更新升级的弹窗,则不显示引导页面 // 如果存在更新升级的弹窗,则不显示引导页面
if (!SupportOSImpl.DESIGNER_LOGIN.support() || !FRContext.isChineseEnv() || DesignerPushUpdateManager.getInstance().isShouldPopUp()) { if (!DesignerLoginUtils.isOnline() || !SupportOSImpl.DESIGNER_LOGIN.support() || !FRContext.isChineseEnv() || DesignerPushUpdateManager.getInstance().isShouldPopUp()) {
return; return;
} }
if (isActivatedForOneWeek()) { if (isActivatedForOneWeek()) {

3
designer-base/src/main/java/com/fr/design/login/message/DesignerMessageHelper.java

@ -51,6 +51,9 @@ public class DesignerMessageHelper {
} }
public void prepareShowMessage() { public void prepareShowMessage() {
if (!DesignerLoginUtils.isOnline()) {
return;
}
DesignerContext.getDesignerFrame().addDesignerOpenedListener(new DesignerOpenedListener() { DesignerContext.getDesignerFrame().addDesignerOpenedListener(new DesignerOpenedListener() {
@Override @Override
public void designerOpened() { public void designerOpened() {

19
designer-base/src/main/java/com/fr/design/login/utils/DesignerLoginUtils.java

@ -3,10 +3,13 @@ package com.fr.design.login.utils;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.mainframe.toast.DesignerToastMsgUtil; import com.fr.design.mainframe.toast.DesignerToastMsgUtil;
import com.fr.general.CloudCenter; import com.fr.general.CloudCenter;
import com.fr.general.CloudCenterConfig;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
import com.fr.general.http.HttpToolbox;
import com.fr.general.log.MessageFormatter; import com.fr.general.log.MessageFormatter;
import com.fr.json.JSONObject; import com.fr.json.JSONObject;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import com.fr.third.org.bouncycastle.util.encoders.Hex; import com.fr.third.org.bouncycastle.util.encoders.Hex;
import java.awt.Window; import java.awt.Window;
import java.security.SecureRandom; import java.security.SecureRandom;
@ -49,6 +52,9 @@ public class DesignerLoginUtils {
} }
public static String generateDesignerSSOUrl(String referrer) { public static String generateDesignerSSOUrl(String referrer) {
if (!DesignerLoginUtils.isOnline()) {
return referrer;
}
String ssoTemplate = CloudCenter.getInstance().acquireUrlByKind("designer.sso.api", "https://id.fanruan.com/api/app/?code={}&referrer={}"); String ssoTemplate = CloudCenter.getInstance().acquireUrlByKind("designer.sso.api", "https://id.fanruan.com/api/app/?code={}&referrer={}");
try { try {
String code = generateLoginCode(); String code = generateLoginCode();
@ -60,6 +66,19 @@ public class DesignerLoginUtils {
return referrer; return referrer;
} }
public static boolean isOnline() {
if (CloudCenterConfig.getInstance().isOnline()) {
String ping = CloudCenter.getInstance().acquireConf("ping", StringUtils.EMPTY);
if (StringUtils.isNotEmpty(ping)) {
try {
return StringUtils.isEmpty(HttpToolbox.get(ping));
} catch (Exception ignore) {
}
}
}
return false;
}
private static String generateLoginCode() throws Exception { private static String generateLoginCode() throws Exception {
DesignerEnvManager manager = DesignerEnvManager.getEnvManager(); DesignerEnvManager manager = DesignerEnvManager.getEnvManager();
JSONObject jo = JSONObject.create(); JSONObject jo = JSONObject.create();

15
designer-base/src/main/java/com/fr/design/mainframe/OpenLoadingPane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe; package com.fr.design.mainframe;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import java.awt.Color; import java.awt.Color;
import java.awt.Component; import java.awt.Component;
@ -17,9 +18,13 @@ import javax.swing.JPanel;
*/ */
public class OpenLoadingPane extends JPanel { public class OpenLoadingPane extends JPanel {
private static final ImageIcon LOADING_ICON = new ImageIcon(IOUtils.readImage("/com/fr/design/images/mainframe/loading.gif")); private static final ImageIcon LOADING_ICON = new ImageIcon(IOUtils.readImage("/com/fr/design/images/mainframe/openloading.png"));
private static final Color TIP_COLOR = new Color(108, 174, 235);
private static final int Y_GAP = 50;
private static final int X_GAP = 10;
private UILabel loadingLabel; private UILabel loadingLabel;
private UILabel tipLabel;
public OpenLoadingPane() { public OpenLoadingPane() {
@ -47,7 +52,12 @@ public class OpenLoadingPane extends JPanel {
int loadingLabelHeight = loadingLabel.getPreferredSize().height; int loadingLabelHeight = loadingLabel.getPreferredSize().height;
int loadingLabelX = (width - loadingLabelWidth) / 2; int loadingLabelX = (width - loadingLabelWidth) / 2;
int loadingLabelY = (height - loadingLabelHeight) / 2; int loadingLabelY = (height - loadingLabelHeight) / 2;
int tipLabelWidth = tipLabel.getPreferredSize().width;
int tipLabelHeight = tipLabel.getPreferredSize().height;
int tipLabelX = (width - tipLabelWidth) / 2 + X_GAP;
int tipLabelY = loadingLabelY + loadingLabelHeight - Y_GAP;
loadingLabel.setBounds(loadingLabelX, loadingLabelY, loadingLabelWidth, loadingLabelHeight); loadingLabel.setBounds(loadingLabelX, loadingLabelY, loadingLabelWidth, loadingLabelHeight);
tipLabel.setBounds(tipLabelX, tipLabelY, tipLabelWidth, tipLabelHeight);
} }
@Override @Override
@ -56,7 +66,10 @@ public class OpenLoadingPane extends JPanel {
}); });
setBackground(Color.WHITE); setBackground(Color.WHITE);
loadingLabel = new UILabel(LOADING_ICON); loadingLabel = new UILabel(LOADING_ICON);
tipLabel = new UILabel(Toolkit.i18nText("Fine-Design_Open_Template_Loading"));
tipLabel.setForeground(TIP_COLOR);
add(loadingLabel); add(loadingLabel);
add(tipLabel);
} }
} }

4
designer-base/src/main/java/com/fr/env/CheckServiceDialog.java vendored

@ -168,7 +168,7 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
JPanel buttonPanel = FRGUIPaneFactory.createBorderLayout_M_Pane(); JPanel buttonPanel = FRGUIPaneFactory.createBorderLayout_M_Pane();
buttonPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10)); buttonPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10));
boolean Sync = false; boolean Sync = false;
if (Sync && isOnline()) { if (isOnline() && Sync) {
ignoreButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Sync_Ignore")); ignoreButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Sync_Ignore"));
ignoreButton.addActionListener(this); ignoreButton.addActionListener(this);
syncButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Sync_To_Local")); syncButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Sync_To_Local"));
@ -308,6 +308,7 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
ignoreButton.setEnabled(false); ignoreButton.setEnabled(false);
syncButton.setEnabled(false);
String[] option = {Toolkit.i18nText("Fine-Design_Report_Yes"), Toolkit.i18nText("Fine-Design_Report_No")}; String[] option = {Toolkit.i18nText("Fine-Design_Report_Yes"), Toolkit.i18nText("Fine-Design_Report_No")};
if (!jarConsistency) { if (!jarConsistency) {
int a = FineJOptionPane.showOptionDialog(getParent(), Toolkit.i18nText("Fine-Design_Basic_Sync_Info_Information"), int a = FineJOptionPane.showOptionDialog(getParent(), Toolkit.i18nText("Fine-Design_Basic_Sync_Info_Information"),
@ -349,6 +350,7 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
@Override @Override
protected JSONArray doInBackground() { protected JSONArray doInBackground() {
progressBar.setVisible(true);
progressBar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins")); progressBar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins"));
progressBar.setValue(0); progressBar.setValue(0);
return VersionCheckUtils.syncPlugins(differentPlugins); return VersionCheckUtils.syncPlugins(differentPlugins);

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.UIPassWordField;
import com.fr.design.gui.ipasswordfield.UIPasswordFieldWithFixedLength; import com.fr.design.gui.ipasswordfield.UIPasswordFieldWithFixedLength;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
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.layout.TableLayoutHelper; 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 = 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); okButton.setEnabled(false);
JPanel jp = new JPanel(); JPanel jp = new JPanel();
JPanel upPane = new JPanel(); JPanel upPane = new JPanel();

15
designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java

@ -6,6 +6,7 @@ import com.fr.module.Activator;
import com.fr.module.ModuleRole; import com.fr.module.ModuleRole;
import com.fr.stable.EncodeConstants; import com.fr.stable.EncodeConstants;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
import com.fr.stable.StringUtils;
import com.fr.startup.FineWebApplicationInitializer; import com.fr.startup.FineWebApplicationInitializer;
import com.fr.third.springframework.web.SpringServletContainerInitializer; import com.fr.third.springframework.web.SpringServletContainerInitializer;
import com.fr.third.springframework.web.context.support.AnnotationConfigWebApplicationContext; import com.fr.third.springframework.web.context.support.AnnotationConfigWebApplicationContext;
@ -26,6 +27,8 @@ import java.util.Set;
*/ */
public class FineEmbedServerActivator extends Activator { public class FineEmbedServerActivator extends Activator {
private static final String TOMCAT_MAX_HEADER_SIZE = "tomcat-maxHttpHeaderSize";
private Tomcat tomcat; private Tomcat tomcat;
@Override @Override
@ -68,6 +71,7 @@ public class FineEmbedServerActivator extends Activator {
// 8.5.x 请求参数带特殊字符被tomcat拒绝 []|{}^\`"<> // 8.5.x 请求参数带特殊字符被tomcat拒绝 []|{}^\`"<>
tomcat.getConnector().setProperty("relaxedQueryChars", "[]|{}^&#x5c;&#x60;&quot;&lt;&gt;"); tomcat.getConnector().setProperty("relaxedQueryChars", "[]|{}^&#x5c;&#x60;&quot;&lt;&gt;");
setMaxPostSize(); setMaxPostSize();
setMaxHttpHeaderSize();
String docBase = new File(WorkContext.getCurrent().getPath()).getParent(); String docBase = new File(WorkContext.getCurrent().getPath()).getParent();
//内置的上下文使用工程目录比如webroot //内置的上下文使用工程目录比如webroot
@ -102,6 +106,17 @@ public class FineEmbedServerActivator extends Activator {
} }
} }
private void setMaxHttpHeaderSize() {
String value = System.getProperty(TOMCAT_MAX_HEADER_SIZE);
if (StringUtils.isNotEmpty(value)) {
try {
tomcat.getConnector().setProperty("maxHttpHeaderSize", value);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
}
private void stopServerActivator() { private void stopServerActivator() {

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.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

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

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

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

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

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

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

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

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

BIN
designer-base/src/main/resources/com/fr/design/images/mainframe/openloading.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

1
designer-form/src/main/java/com/fr/design/designer/creator/XNameWidget.java

@ -91,7 +91,6 @@ public class XNameWidget extends XWidgetCreator {
if (editor != null) { if (editor != null) {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
add(editor, BorderLayout.CENTER); add(editor, BorderLayout.CENTER);
this.setVisible(toData().isVisible());
} }
} }

8
designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java

@ -24,6 +24,7 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.design.mainframe.EastRegionContainerPane;
import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.JForm; import com.fr.design.mainframe.JForm;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.widget.DataModify; import com.fr.design.widget.DataModify;
import com.fr.design.widget.FormWidgetDefinePaneFactoryBase; import com.fr.design.widget.FormWidgetDefinePaneFactoryBase;
import com.fr.design.widget.Operator; import com.fr.design.widget.Operator;
@ -86,7 +87,7 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane {
return null; return null;
} else if (xLayoutContainer.acceptType(XWAbsoluteLayout.class)) { } else if (xLayoutContainer.acceptType(XWAbsoluteLayout.class)) {
return new WidgetAbsoluteBoundPane(xCreator); return new WidgetAbsoluteBoundPane(xCreator);
} else if(xCreator.acceptType(XWCardTagLayout.class)){ } else if (xCreator.acceptType(XWCardTagLayout.class)) {
return new WidgetCardTagBoundPane(xCreator); return new WidgetCardTagBoundPane(xCreator);
} }
return new WidgetBoundPane(xCreator); return new WidgetBoundPane(xCreator);
@ -164,7 +165,8 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane {
} }
private static void freshPropertyMode(XCreator xCreator) { private static void freshPropertyMode(XCreator xCreator) {
if (!(HistoryTemplateListCache.getInstance().getCurrentEditingTemplate() instanceof JForm)) { JTemplate jTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
if (!(jTemplate instanceof JForm) && jTemplate.isUpMode()) {
if (xCreator instanceof XWParameterLayout) { if (xCreator instanceof XWParameterLayout) {
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT_PARA); EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT_PARA);
} else { } else {
@ -231,7 +233,7 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane {
UITextField widgetNameField = widgetPropertyPane.getWidgetNameField(); UITextField widgetNameField = widgetPropertyPane.getWidgetNameField();
String toSetWidgetName = widgetNameField.getText(); String toSetWidgetName = widgetNameField.getText();
String currentWidgetName = widget.getWidgetName(); String currentWidgetName = widget.getWidgetName();
boolean exist = designer.getTarget().isNameExist(toSetWidgetName) && !ComparatorUtils.equals(toSetWidgetName, currentWidgetName); boolean exist = designer.getTarget().isNameExist(toSetWidgetName, widget) && !ComparatorUtils.equals(toSetWidgetName, currentWidgetName);
if (toSetWidgetName.isEmpty()) { if (toSetWidgetName.isEmpty()) {
widgetNameField.setText(currentWidgetName); widgetNameField.setText(currentWidgetName);
return; return;

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.BaseFormula;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter; 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); 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 fontNameComboBox;
private UIComboBox fontSizeComboBox; private UIComboBox fontSizeComboBox;
private UIToggleButton bold; private UIToggleButton bold;
@ -153,11 +159,11 @@ public class RichTextToolBar extends BasicPane{
} }
private void bindListener(){ private void bindListener(){
FRFont defaultFont = (this.textPane != null) ? FRFont.getInstance(this.textPane.getFont()) : RichTextPane.DEFAUL_FONT; // 这里下拉框默认选中字体 不由UI界面字体决定 两套不同体系
fontNameComboBox.addItemListener(fontNameItemListener); fontNameComboBox.addItemListener(fontNameItemListener);
fontNameComboBox.setSelectedItem(defaultFont.getFamily()); fontNameComboBox.setSelectedItem(DEFAULT_FONT.getFamily());
fontSizeComboBox.addItemListener(fontSizeItemListener); fontSizeComboBox.addItemListener(fontSizeItemListener);
fontSizeComboBox.setSelectedItem(scaleDown(defaultFont.getSize())); fontSizeComboBox.setSelectedItem(scaleDown(DEFAULT_FONT.getSize()));
bold.addActionListener(blodChangeAction); bold.addActionListener(blodChangeAction);
italic.addActionListener(itaChangeAction); italic.addActionListener(itaChangeAction);

22
designer-realize/src/main/java/com/fr/design/mainframe/app/DesignerAppUtils.java

@ -16,6 +16,10 @@ import com.fr.plugin.manage.PluginManager;
import com.fr.plugin.manage.control.PluginControllerHelper; import com.fr.plugin.manage.control.PluginControllerHelper;
import com.fr.plugin.manage.control.PluginExtraInfo; import com.fr.plugin.manage.control.PluginExtraInfo;
import com.fr.plugin.manage.control.PluginTask; import com.fr.plugin.manage.control.PluginTask;
import com.fr.plugin.observer.PluginEvent;
import com.fr.plugin.observer.PluginEventListener;
import com.fr.plugin.observer.PluginEventType;
import com.fr.plugin.observer.PluginListenerRegistration;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.TemplateIOErrorContextHolder; import com.fr.stable.TemplateIOErrorContextHolder;
import com.fr.third.guava.cache.Cache; import com.fr.third.guava.cache.Cache;
@ -39,6 +43,7 @@ public class DesignerAppUtils {
private static final int DEFAULT_MAX_CACHE_SIZE = 50; private static final int DEFAULT_MAX_CACHE_SIZE = 50;
private static final int DEFAULT_CONCURRENCY_LEVEL = 8; private static final int DEFAULT_CONCURRENCY_LEVEL = 8;
private static final long DEFAULT_EXPIRE_HOURS = 1; private static final long DEFAULT_EXPIRE_HOURS = 1;
private volatile static boolean enablePluginTipDialog = true;
private static final Cache<String, Multimap<String, PluginMarkerAdapter>> ERROR_CACHE = CacheBuilder.newBuilder() private static final Cache<String, Multimap<String, PluginMarkerAdapter>> ERROR_CACHE = CacheBuilder.newBuilder()
.maximumSize(DEFAULT_MAX_CACHE_SIZE) .maximumSize(DEFAULT_MAX_CACHE_SIZE)
@ -46,6 +51,21 @@ public class DesignerAppUtils {
.concurrencyLevel(DEFAULT_CONCURRENCY_LEVEL) .concurrencyLevel(DEFAULT_CONCURRENCY_LEVEL)
.build(); .build();
public static void initPluginAllActiveListener() {
PluginListenerRegistration.getInstance().listen(PluginEventType.BeforeAllStop, new PluginEventListener() {
@Override
public void on(PluginEvent event) {
enablePluginTipDialog = false;
}
});
PluginListenerRegistration.getInstance().listen(PluginEventType.AfterAllActive, new PluginEventListener() {
@Override
public void on(PluginEvent event) {
enablePluginTipDialog = true;
}
});
}
/** /**
* 弹出指定的插件信息 * 弹出指定的插件信息
* 并失效缓存 * 并失效缓存
@ -77,7 +97,7 @@ public class DesignerAppUtils {
* @return 格式化后的多行插件错误信息详情 * @return 格式化后的多行插件错误信息详情
*/ */
public static String dealWithErrorDetailMultiLineAndCache(String key) { public static String dealWithErrorDetailMultiLineAndCache(String key) {
if (!DesignerEnvManager.getEnvManager().isShowTemplateMissingPlugin()) { if (!DesignerEnvManager.getEnvManager().isShowTemplateMissingPlugin() || !enablePluginTipDialog) {
// 直接清空不提示 // 直接清空不提示
TemplateIOErrorContextHolder.reset(); TemplateIOErrorContextHolder.reset();
return StringUtils.EMPTY; return StringUtils.EMPTY;

2
designer-realize/src/main/java/com/fr/start/module/DesignerInitActivator.java

@ -1,6 +1,7 @@
package com.fr.start.module; package com.fr.start.module;
import com.fr.design.PluginClassRefreshManager; import com.fr.design.PluginClassRefreshManager;
import com.fr.design.mainframe.app.DesignerAppUtils;
import com.fr.module.Activator; import com.fr.module.Activator;
import com.fr.start.DesignerInitial; import com.fr.start.DesignerInitial;
@ -17,6 +18,7 @@ public class DesignerInitActivator extends Activator {
@Override @Override
public void start() { public void start() {
PluginClassRefreshManager.getInstance().load(); PluginClassRefreshManager.getInstance().load();
DesignerAppUtils.initPluginAllActiveListener();
DesignerInitial.init(findSingleton(StartupArgs.class).get()); DesignerInitial.init(findSingleton(StartupArgs.class).get());
} }

Loading…
Cancel
Save