Browse Source

REPORT-60392 【固定布局-原布局推荐4.1】决策报表-自适应布局-新建空白模板/带布局模板,右侧组件目录树处,body名字变空了

research/11.0
方磊 3 years ago
parent
commit
295a219bd6
  1. 10
      designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java
  2. 4
      designer-form/src/main/java/com/fr/design/widget/ui/designer/NewFormPane.java

10
designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java

@ -1010,15 +1010,7 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
}
private void refreshCenter(Widget centerWidget, XLayoutContainer formLayoutContainer) {
// 不存在center块, 说明是新建的模板
if (centerWidget == null) {
XLayoutContainer layoutContainer = (XLayoutContainer) XCreatorUtils.createXCreator(new WFitLayout("body"));
layoutContainer.setSize(LARGE_PREFERRED_SIZE);
setRootComponent(layoutContainer);
formLayoutContainer.add(rootComponent, WBorderLayout.CENTER);
return;
}
// 不存在center块, 说明是新建的模板(fanglei:大人,时代变了)
XLayoutContainer centerContainer = (XLayoutContainer) XCreatorUtils.createXCreator(centerWidget);
Dimension d = new Dimension();
d.width = ((WFitLayout) centerWidget).getContainerWidth();

4
designer-form/src/main/java/com/fr/design/widget/ui/designer/NewFormPane.java

@ -294,7 +294,9 @@ public class NewFormPane extends BasicPane {
}
private Form initEmptyBodyForm() {
WFitLayout body = new WFitLayout();
WFitLayout body = new WFitLayout("body");
body.setContainerWidth(WBorderLayout.DEFAULT_WIDTH);
body.setContainerHeight(WBorderLayout.DEFAULT_HEIGHT);
WBorderLayout borderLayout = new WBorderLayout("form");
borderLayout.addCenter(body);
return new Form(borderLayout);

Loading…
Cancel
Save