Browse Source

Merge pull request #4255 in DESIGN/design from bugfix/10.0 to feature/10.0

* commit '9dd40ecf89acfa5cc4dfe630746ce86f0df3df76':
  REPORT-52212 【10.0.16冒烟】切换远程出现白色弹窗 update 遗漏的
  REPORT-52212 【10.0.16冒烟】切换远程出现白色弹窗
  代码修改
  REPORT-51188 决策报表的tab块,在绝对布局下拖拽存在缩小问题
feature/10.0
superman 4 years ago
parent
commit
a737c392f5
  1. 26
      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. 2
      designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceActivator.java

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

@ -95,7 +95,9 @@ public class EnvChangeEntrance {
* @param envName 目标工作目录名称 * @param envName 目标工作目录名称
*/ */
public void switch2Env(final String envName) { public void switch2Env(final String envName) {
switch2Env(envName, PopTipStrategy.LATER); if (switch2Env(envName, PopTipStrategy.LATER)) {
PopTipStrategy.LATER.showTip(new SuccessPopTip());
}
} }
/** /**
@ -117,7 +119,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 +157,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 +173,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 +193,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 {
@ -444,7 +446,9 @@ public class EnvChangeEntrance {
@Override @Override
public void doOk() { public void doOk() {
envListOkAction(envListPane, PopTipStrategy.LATER); if (envListOkAction(envListPane, PopTipStrategy.LATER)) {
PopTipStrategy.LATER.showTip(new SuccessPopTip());
}
// 切换完成后清理密码 // 切换完成后清理密码
updateNotRememberPwdEnv(); updateNotRememberPwdEnv();
} }
@ -553,4 +557,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

@ -36,6 +36,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;
@ -268,8 +269,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(
@ -411,8 +430,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);
// 拖动滑块,先将内部组件百分比大小计算,再计算容器大小 // 拖动滑块,先将内部组件百分比大小计算,再计算容器大小
@ -449,7 +468,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());

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