Browse Source

Merge pull request #4270 in DESIGN/design from feature/10.0 to feature/x

* commit '0cbe9f76cd4d0461176385bb75fca1d0d5625e1e':
  REPORT-52212 去掉工作目录切换成功提示
  REPORT-49014 update 修改下国际化key
  REPORT-49014 连接同一个远程环境,同时双击打开同一个模板 一人正常打开 一人打开空白
  REPORT-52212 【10.0.16冒烟】切换远程出现白色弹窗 update 遗漏的
  REPORT-52212 【10.0.16冒烟】切换远程出现白色弹窗
  代码修改
  REPORT-51188 决策报表的tab块,在绝对布局下拖拽存在缩小问题
research/11.0
superman 4 years ago
parent
commit
65b03f0fa7
  1. 18
      designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java
  2. 2
      designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java
  3. 22
      designer-form/src/main/java/com/fr/design/mainframe/FormArea.java
  4. 27
      designer-realize/src/main/java/com/fr/design/mainframe/TemplateLockedHandler.java
  5. 2
      designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java
  6. 2
      designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java
  7. 2
      designer-realize/src/main/java/com/fr/design/mainframe/app/XlsApp.java
  8. 2
      designer-realize/src/main/java/com/fr/design/mainframe/app/XlsxApp.java
  9. 2
      designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceActivator.java

18
designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java

@ -117,7 +117,7 @@ public class EnvChangeEntrance {
@Override @Override
public void show() { public void show() {
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Failed"), FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Failed"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Error"), ERROR_MESSAGE, UIManager.getIcon("OptionPane.errorIcon")); com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), ERROR_MESSAGE, UIManager.getIcon("OptionPane.errorIcon"));
} }
}); });
return false; return false;
@ -155,7 +155,7 @@ public class EnvChangeEntrance {
public void show() { public void show() {
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Failed"), Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Failed"),
Toolkit.i18nText("Fine-Design_Basic_Error"), Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"),
ERROR_MESSAGE, ERROR_MESSAGE,
UIManager.getIcon("OptionPane.errorIcon")); UIManager.getIcon("OptionPane.errorIcon"));
} }
@ -171,7 +171,7 @@ public class EnvChangeEntrance {
FineLoggerFactory.getLogger().error(exception.getMessage(), exception); FineLoggerFactory.getLogger().error(exception.getMessage(), exception);
strategy.showTip(() -> FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), strategy.showTip(() -> FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Failed"), Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Failed"),
Toolkit.i18nText("Fine-Design_Basic_Error"), Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"),
ERROR_MESSAGE, ERROR_MESSAGE,
UIManager.getIcon("OptionPane.errorIcon"))); UIManager.getIcon("OptionPane.errorIcon")));
} }
@ -191,7 +191,7 @@ public class EnvChangeEntrance {
if (ComparatorUtils.equals(result, TestConnectionResult.AUTH_FAILED)) { if (ComparatorUtils.equals(result, TestConnectionResult.AUTH_FAILED)) {
strategy.showTip(() -> FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), strategy.showTip(() -> FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Failed"), Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Failed"),
Toolkit.i18nText("Fine-Design_Basic_Error"), Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"),
ERROR_MESSAGE, ERROR_MESSAGE,
UIManager.getIcon("OptionPane.errorIcon"))); UIManager.getIcon("OptionPane.errorIcon")));
} else { } else {
@ -553,4 +553,14 @@ public class EnvChangeEntrance {
interface PopTip { interface PopTip {
void show(); void show();
} }
private static class SuccessPopTip implements PopTip {
@Override
public void show() {
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
Toolkit.i18nText("Fine-Design_Basic_Switch_Workspace_Success"),
Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"),
FineJOptionPane.INFORMATION_MESSAGE);
}
}
} }

2
designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java

@ -121,7 +121,7 @@ public class XWFitLayout extends XLayoutContainer {
* 更新组件的backupBound * 更新组件的backupBound
* 拖动滑块改变容器大小改变的是界面显示大小更新bound再次拖入或拉伸边框用到 * 拖动滑块改变容器大小改变的是界面显示大小更新bound再次拖入或拉伸边框用到
*/ */
private void updateCreatorsBackupBound() { public void updateCreatorsBackupBound() {
for (int i=0,size=this.getComponentCount(); i<size; i++) { for (int i=0,size=this.getComponentCount(); i<size; i++) {
Component comp = this.getComponent(i); Component comp = this.getComponent(i);
XCreator creator = (XCreator) comp; XCreator creator = (XCreator) comp;

22
designer-form/src/main/java/com/fr/design/mainframe/FormArea.java

@ -35,6 +35,7 @@ import javax.swing.event.ChangeListener;
import java.awt.AWTEvent; import java.awt.AWTEvent;
import java.awt.Adjustable; import java.awt.Adjustable;
import java.awt.Color; import java.awt.Color;
import java.awt.Component;
import java.awt.Container; import java.awt.Container;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.Insets; import java.awt.Insets;
@ -266,8 +267,26 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
} }
} }
LayoutUtils.layoutContainer(root); LayoutUtils.layoutContainer(root);
updateCreatorsBackupBound(root);
} }
/**
* 给所有自适应布局内部的组件设置backupBounds
* @param creator
*/
private void updateCreatorsBackupBound(XCreator creator) {
if (creator.acceptType(XWFitLayout.class)) {
((XWFitLayout) creator).updateCreatorsBackupBound();
}
for (int i = 0; i < creator.getComponentCount(); i++) {
Component object = creator.getComponent(i);
if(object instanceof XCreator){
updateCreatorsBackupBound((XCreator) object);
}
}
}
//设置宽度的控件及响应事件 //设置宽度的控件及响应事件
private void addWidthPaneListener() { private void addWidthPaneListener() {
widthPane.addActionListener( widthPane.addActionListener(
@ -427,8 +446,8 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
if (root.acceptType(XWFitLayout.class)) { if (root.acceptType(XWFitLayout.class)) {
XWFitLayout layout = (XWFitLayout) root; XWFitLayout layout = (XWFitLayout) root;
layout.setContainerPercent(value / DEFAULT_SLIDER); layout.setContainerPercent(value / DEFAULT_SLIDER);
layout.adjustCreatorsWhileSlide(percent);
traverAndAdjust(layout, percent); traverAndAdjust(layout, percent);
layout.adjustCreatorsWhileSlide(percent);
// 拖动滑块,先将内部组件百分比大小计算,再计算容器大小 // 拖动滑块,先将内部组件百分比大小计算,再计算容器大小
@ -465,7 +484,6 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
layout.setContainerPercent(1.0); layout.setContainerPercent(1.0);
traverAndAdjust(layout, 0.0); traverAndAdjust(layout, 0.0);
layout.adjustCreatorsWhileSlide(0.0); layout.adjustCreatorsWhileSlide(0.0);
// 拖动滑块,先将内部组件百分比大小计算,再计算容器大小 // 拖动滑块,先将内部组件百分比大小计算,再计算容器大小
Dimension d = new Dimension(layout.getWidth(), layout.getHeight()); Dimension d = new Dimension(layout.getWidth(), layout.getHeight());

27
designer-realize/src/main/java/com/fr/design/mainframe/TemplateLockedHandler.java

@ -0,0 +1,27 @@
package com.fr.design.mainframe;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.ui.util.UIUtil;
/**
* @author hades
* @version 10.0
* Created by hades on 2021/5/14
*/
public class TemplateLockedHandler {
public static void generateTipAndRefresh() {
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
Toolkit.i18nText("Fine_Designer_Remote_Design_Locked_Message"),
Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"),
FineJOptionPane.WARNING_MESSAGE);
DesignerFrameFileDealerPane.getInstance().refresh();
}
});
}
}

2
designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java

@ -13,6 +13,7 @@ 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.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DecodeDialog; import com.fr.design.mainframe.DecodeDialog;
import com.fr.design.mainframe.TemplateLockedHandler;
import com.fr.design.ui.util.UIUtil; import com.fr.design.ui.util.UIUtil;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.exception.DecryptTemplateException; import com.fr.exception.DecryptTemplateException;
@ -68,6 +69,7 @@ class CptApp extends AbstractWorkBookApp {
FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied") + file, exp); FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied") + file, exp);
} catch (TplLockedException exp) { } catch (TplLockedException exp) {
FineLoggerFactory.getLogger().error(file + Toolkit.i18nText("Fine-Design_Basic_Template_Status_Locked"), exp); FineLoggerFactory.getLogger().error(file + Toolkit.i18nText("Fine-Design_Basic_Template_Status_Locked"), exp);
TemplateLockedHandler.generateTipAndRefresh();
} catch (Exception exp) { } catch (Exception exp) {
FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Report_NS_Exception_ReadError") + file, exp); FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Report_NS_Exception_ReadError") + file, exp);
} }

2
designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java

@ -10,6 +10,7 @@ import com.fr.design.mainframe.BaseJForm;
import com.fr.design.mainframe.DecodeDialog; import com.fr.design.mainframe.DecodeDialog;
import com.fr.design.mainframe.JForm; import com.fr.design.mainframe.JForm;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.TemplateLockedHandler;
import com.fr.design.worker.open.OpenResult; import com.fr.design.worker.open.OpenResult;
import com.fr.design.worker.open.OpenWorker; import com.fr.design.worker.open.OpenWorker;
import com.fr.exception.DecryptTemplateException; import com.fr.exception.DecryptTemplateException;
@ -106,6 +107,7 @@ class FormApp extends AbstractAppProvider {
FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied") + file, exp); FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied") + file, exp);
} catch (TplLockedException exp) { } catch (TplLockedException exp) {
FineLoggerFactory.getLogger().error(file + Toolkit.i18nText("Fine-Design_Basic_Template_Status_Locked"), exp); FineLoggerFactory.getLogger().error(file + Toolkit.i18nText("Fine-Design_Basic_Template_Status_Locked"), exp);
TemplateLockedHandler.generateTipAndRefresh();
} catch (Exception exp) { } catch (Exception exp) {
FineLoggerFactory.getLogger().error("Failed to generate frm from " + file, exp); FineLoggerFactory.getLogger().error("Failed to generate frm from " + file, exp);
return null; return null;

2
designer-realize/src/main/java/com/fr/design/mainframe/app/XlsApp.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe.app;
import com.fr.base.extension.FileExtension; import com.fr.base.extension.FileExtension;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.TemplateLockedHandler;
import com.fr.exception.RemoteDesignPermissionDeniedException; import com.fr.exception.RemoteDesignPermissionDeniedException;
import com.fr.exception.TplLockedException; import com.fr.exception.TplLockedException;
import com.fr.file.FILE; import com.fr.file.FILE;
@ -30,6 +31,7 @@ class XlsApp extends AbstractWorkBookApp {
FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied") + tplFile, exp); FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied") + tplFile, exp);
} catch (TplLockedException exp) { } catch (TplLockedException exp) {
FineLoggerFactory.getLogger().error(tplFile + Toolkit.i18nText("Fine-Design_Basic_Template_Status_Locked"), exp); FineLoggerFactory.getLogger().error(tplFile + Toolkit.i18nText("Fine-Design_Basic_Template_Status_Locked"), exp);
TemplateLockedHandler.generateTipAndRefresh();
} catch (Exception exp) { } catch (Exception exp) {
FineLoggerFactory.getLogger().error("Failed to generate xls from " + tplFile, exp); FineLoggerFactory.getLogger().error("Failed to generate xls from " + tplFile, exp);
} }

2
designer-realize/src/main/java/com/fr/design/mainframe/app/XlsxApp.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe.app;
import com.fr.base.extension.FileExtension; import com.fr.base.extension.FileExtension;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.TemplateLockedHandler;
import com.fr.exception.RemoteDesignPermissionDeniedException; import com.fr.exception.RemoteDesignPermissionDeniedException;
import com.fr.exception.TplLockedException; import com.fr.exception.TplLockedException;
import com.fr.file.FILE; import com.fr.file.FILE;
@ -31,6 +32,7 @@ class XlsxApp extends AbstractWorkBookApp {
FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied") + tplFile, exp); FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied") + tplFile, exp);
} catch (TplLockedException exp) { } catch (TplLockedException exp) {
FineLoggerFactory.getLogger().error(tplFile + Toolkit.i18nText("Fine-Design_Basic_Template_Status_Locked"), exp); FineLoggerFactory.getLogger().error(tplFile + Toolkit.i18nText("Fine-Design_Basic_Template_Status_Locked"), exp);
TemplateLockedHandler.generateTipAndRefresh();
} catch (Exception exp) { } catch (Exception exp) {
FineLoggerFactory.getLogger().error("Failed to generate xlsx from " + tplFile, exp); FineLoggerFactory.getLogger().error("Failed to generate xlsx from " + tplFile, exp);
} }

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

@ -52,7 +52,6 @@ public class DesignerWorkspaceActivator extends Activator {
@Override @Override
public void on(Event event, Workspace workspace) { public void on(Event event, Workspace workspace) {
WorkspaceChangeLoadingDialog.showDialog();
PluginClassRefreshManager.getInstance().removePluginListener(); PluginClassRefreshManager.getInstance().removePluginListener();
HistoryTemplateListCache.getInstance().stash(); HistoryTemplateListCache.getInstance().stash();
} }
@ -64,7 +63,6 @@ public class DesignerWorkspaceActivator extends Activator {
@Override @Override
public void on(Event event, Workspace workspace) { public void on(Event event, Workspace workspace) {
HistoryTemplateListCache.getInstance().load();
PluginClassRefreshManager.getInstance().addPluginListener(); PluginClassRefreshManager.getInstance().addPluginListener();
WorkspaceChangeLoadingDialog.hideDialog(); WorkspaceChangeLoadingDialog.hideDialog();
} }

Loading…
Cancel
Save