Browse Source

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

* commit 'b995b6287d800d462e240bb75ae6528dff7c6858':
  REPORT-52087 单元格元素数据列中首次修改字符不会生效
  REPORT-49014 update 修改下国际化key
  REPORT-49014 连接同一个远程环境,同时双击打开同一个模板 一人正常打开 一人打开空白
  REPORT-52087 单元格元素数据列中首次修改字符不会生效
  REPORT-52087 单元格元素数据列中首次修改字符不会生效
  代码修改
  REPORT-51188 决策报表的tab块,在绝对布局下拖拽存在缩小问题
  REPORT-51830 tab里报表块设置图片背景,复制粘贴得到的tab里的报表块预览时没有背景了,设计器里看是有图片背景的。0228也有此现象。
  REPORT-51188 决策报表的tab块,在绝对布局下拖拽存在缩小问题
zheng-1641779399395
superman 3 years ago
parent
commit
9cf4175e88
  1. 8
      designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java
  2. 2
      designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java
  3. 2
      designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java
  4. 20
      designer-form/src/main/java/com/fr/design/mainframe/FormArea.java
  5. 27
      designer-realize/src/main/java/com/fr/design/mainframe/TemplateLockedHandler.java
  6. 2
      designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java
  7. 2
      designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java
  8. 2
      designer-realize/src/main/java/com/fr/design/mainframe/app/XlsApp.java
  9. 2
      designer-realize/src/main/java/com/fr/design/mainframe/app/XlsxApp.java

8
designer-base/src/main/java/com/fr/design/gui/icombobox/LazyComboBox.java

@ -62,6 +62,12 @@ public abstract class LazyComboBox extends UIComboBox implements PopupMenuListen
this.setModel(new DefaultComboBoxModel<>(new Object[]{anObject}));
super.setSelectedItem(anObject);
}
}
private void setSelectedItemWithDocumentChange(Object anObject) {
initialSelected = anObject;
super.setSelectedItem(anObject);
}
@Override
@ -183,7 +189,7 @@ public abstract class LazyComboBox extends UIComboBox implements PopupMenuListen
}
filtering = true;
String xx = textField.getText();
LazyComboBox.this.setSelectedItem(xx);
LazyComboBox.this.setSelectedItemWithDocumentChange(xx);
this.item = textField.getText();
setPopupVisible(true);

2
designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java

@ -235,6 +235,8 @@ public class FRAbsoluteLayoutAdapter extends FRBodyLayoutAdapter {
} else {
container.add(creator, creator.toData().getWidgetName(),0);
}
//这边将组件添加到container后,需要做下layout处理,否则其内部的一些组件的宽高可能为0,从而导致在updateChildBounds的时候出现问题
LayoutUtils.layoutRootContainer(creator);
XWAbsoluteLayout layout = (XWAbsoluteLayout) container;
layout.updateBoundsWidget(creator);
updateCreatorBackBound();

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

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

20
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.Adjustable;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Insets;
@ -268,8 +269,26 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
}
}
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() {
widthPane.addActionListener(
@ -449,7 +468,6 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
layout.setContainerPercent(1.0);
traverAndAdjust(layout, 0.0);
layout.adjustCreatorsWhileSlide(0.0);
// 拖动滑块,先将内部组件百分比大小计算,再计算容器大小
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.i18n.Toolkit;
import com.fr.design.mainframe.DecodeDialog;
import com.fr.design.mainframe.TemplateLockedHandler;
import com.fr.design.ui.util.UIUtil;
import com.fr.design.utils.gui.GUICoreUtils;
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);
} catch (TplLockedException exp) {
FineLoggerFactory.getLogger().error(file + Toolkit.i18nText("Fine-Design_Basic_Template_Status_Locked"), exp);
TemplateLockedHandler.generateTipAndRefresh();
} catch (Exception 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.JForm;
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.OpenWorker;
import com.fr.exception.DecryptTemplateException;
@ -107,6 +108,7 @@ class FormApp extends AbstractAppProvider {
FineLoggerFactory.getLogger().error(Toolkit.i18nText("Fine-Design_Basic_Template_Permission_Denied") + file, exp);
} catch (TplLockedException exp) {
FineLoggerFactory.getLogger().error(file + Toolkit.i18nText("Fine-Design_Basic_Template_Status_Locked"), exp);
TemplateLockedHandler.generateTipAndRefresh();
} catch (Exception exp) {
FineLoggerFactory.getLogger().error("Failed to generate frm from " + file, exp);
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.design.i18n.Toolkit;
import com.fr.design.mainframe.TemplateLockedHandler;
import com.fr.exception.RemoteDesignPermissionDeniedException;
import com.fr.exception.TplLockedException;
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);
} catch (TplLockedException exp) {
FineLoggerFactory.getLogger().error(tplFile + Toolkit.i18nText("Fine-Design_Basic_Template_Status_Locked"), exp);
TemplateLockedHandler.generateTipAndRefresh();
} catch (Exception 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.design.i18n.Toolkit;
import com.fr.design.mainframe.TemplateLockedHandler;
import com.fr.exception.RemoteDesignPermissionDeniedException;
import com.fr.exception.TplLockedException;
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);
} catch (TplLockedException exp) {
FineLoggerFactory.getLogger().error(tplFile + Toolkit.i18nText("Fine-Design_Basic_Template_Status_Locked"), exp);
TemplateLockedHandler.generateTipAndRefresh();
} catch (Exception exp) {
FineLoggerFactory.getLogger().error("Failed to generate xlsx from " + tplFile, exp);
}

Loading…
Cancel
Save