Browse Source

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

* commit '2d108f9745e71f69687538bce10698ac23560776':
  REPORT-59476 文本控件校验规则支持国际化
  REPORT-56437 & REPORT-58955 国际化问题调整
  REPORT-60683 设计器-设计器操作-10设计器刚启动好,打开11制作的模板,模板会长时间处在加载中状态,除非打开其它模板,刚才的11模板才会弹出REPORT-59959中添加的提示文本
  REPORT-60528 决策报表,给一个高度较小的tab内拖入报表块,会触发弹窗提示“超出或者小于tablayout边界,不能调整大小”;客户模板的弹窗不断触发导致设计器无法操作使用
bugfix/10.0
superman 3 years ago
parent
commit
87d60d14c3
  1. 2
      designer-base/src/main/java/com/fr/design/fun/TextFieldAdapterProvider.java
  2. 2
      designer-base/src/main/java/com/fr/design/worker/open/OpenWorker.java
  3. 45
      designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRCardMainBorderLayoutAdapter.java

2
designer-base/src/main/java/com/fr/design/fun/TextFieldAdapterProvider.java

@ -4,7 +4,7 @@ import com.fr.design.beans.ErrorMsgTextFieldAdapter;
import com.fr.stable.fun.mark.Immutable; import com.fr.stable.fun.mark.Immutable;
public interface TextFieldAdapterProvider extends Immutable { public interface TextFieldAdapterProvider extends Immutable {
String XML_TAG = "ErrorMesPaneWrapperProvider"; String XML_TAG = "TextFieldAdapterProvider";
int CURRENT_LEVEL = 1; int CURRENT_LEVEL = 1;
ErrorMsgTextFieldAdapter createTextFieldAdapter(); ErrorMsgTextFieldAdapter createTextFieldAdapter();

2
designer-base/src/main/java/com/fr/design/worker/open/OpenWorker.java

@ -133,7 +133,7 @@ public class OpenWorker<T> extends SwingWorker<T, Void> {
this.template.setOpening(false); this.template.setOpening(false);
JTemplate<?, ?> currentTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); JTemplate<?, ?> currentTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
// 需要判断当前打开的模板是不是异步执行后失败的模板 是的话立即展示失败后的提示内容 否则只设置下失败的提示内容 // 需要判断当前打开的模板是不是异步执行后失败的模板 是的话立即展示失败后的提示内容 否则只设置下失败的提示内容
if (ComparatorUtils.equals(currentTemplate.getEditingFILE().getName(), this.template.getName())) { if (ComparatorUtils.equals(currentTemplate.getEditingFILE().getName(), this.template.getEditingFILE().getName())) {
DesignerContext.getDesignerFrame().getCenterTemplateCardPane().showOpenFailedCover(text); DesignerContext.getDesignerFrame().getCenterTemplateCardPane().showOpenFailedCover(text);
DesignerFrameFileDealerPane.getInstance().stateChange(); DesignerFrameFileDealerPane.getInstance().stateChange();
} else { } else {

45
designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRCardMainBorderLayoutAdapter.java

@ -4,11 +4,12 @@ import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.cardlayout.XWCardTagLayout; import com.fr.design.designer.creator.cardlayout.XWCardTagLayout;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.form.layout.FRBorderLayout; import com.fr.design.form.layout.FRBorderLayout;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.ui.util.UIUtil;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import javax.swing.JOptionPane;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Rectangle; import java.awt.Rectangle;
@ -46,18 +47,42 @@ public class FRCardMainBorderLayoutAdapter extends FRBorderLayoutAdapter {
Rectangle rectangle = creator.getBounds(); Rectangle rectangle = creator.getBounds();
//不能超出控件边界 //不能超出控件边界
if (ComparatorUtils.equals(constraints, BorderLayout.NORTH) || ComparatorUtils.equals(constraints, BorderLayout.SOUTH)) { if (ComparatorUtils.equals(constraints, BorderLayout.NORTH) || ComparatorUtils.equals(constraints, BorderLayout.SOUTH)) {
int containerHeight = container.getHeight(); return isBeyondMinConstraint(rectangle.height, container.getHeight());
if (rectangle.height > containerHeight) {
FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Beyond_Tablayout_Bounds"));
return true;
}
} else if (ComparatorUtils.equals(constraints, BorderLayout.EAST) || ComparatorUtils.equals(constraints, BorderLayout.WEST)) { } else if (ComparatorUtils.equals(constraints, BorderLayout.EAST) || ComparatorUtils.equals(constraints, BorderLayout.WEST)) {
int containerWidth = container.getWidth(); return isBeyondMinConstraint(rectangle.width, container.getWidth());
if (rectangle.width > containerWidth) { }
return false;
}
/**
* 是否超出最小限制
*
* @param minConstraint 最小限制
* @param value 数值
* @return 是否超出最小限制
*/
private boolean isBeyondMinConstraint(int minConstraint, int value) {
if (minConstraint > value) {
FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Beyond_Tablayout_Bounds")); FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Beyond_Tablayout_Bounds"));
return true; if (container.getBackupBound() != null) {
// 手动拖动导致变矮的场景
container.setSize(container.getBackupBound().getSize());
} else {
// 自适应布局平分高度导致变矮的场景
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
JTemplate<?, ?> jt = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (jt != null) {
jt.undo();
} }
} }
});
}
return true;
} else {
return false; return false;
} }
}
} }

Loading…
Cancel
Save