Browse Source

Pull request #7637: REPORT-65976 复用组件-绝对布局拖入绝对画布块的组件,绝对画布块里的子组件没有随着绝对画布块的尺寸进行缩放,比绝对画布块小;拖入到占位块里是正常充满的

Merge in DESIGN/design from ~KERRY/design_10.0:release/11.0 to release/11.0

* commit '0feb72fc3982322acfce13030667b6043d26bbec':
  REPORT-65976 复用组件-绝对布局拖入绝对画布块的组件,绝对画布块里的子组件没有随着绝对画布块的尺寸进行缩放,比绝对画布块小;拖入到占位块里是正常充满的
  Revert "REPORT-64445 新老自适应配置面板修改"
  REPORT-64445 新老自适应配置面板修改
bugfix/11.0
kerry 3 years ago
parent
commit
8dba1e892f
  1. 1
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/LocalWidgetBlock.java
  2. 1
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/OnlineWidgetBlock.java
  3. 24
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/PreviewWidgetBlock.java

1
designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/LocalWidgetBlock.java

@ -252,6 +252,7 @@ public class LocalWidgetBlock extends PreviewWidgetBlock<DefaultSharableWidget>
ShareUIUtils.showErrorMessageDialog(Toolkit.i18nText("Fine-Design_Share_Drag_Error_Info"));
return null;
}
compatibleProcessAbsoluteLayoutResolution(creatorSource);
creatorSource.setWidgetID(UUID.randomUUID().toString());
((AbstractBorderStyleWidget) creatorSource).addWidgetAttrMark(new SharableAttrMark(true));
//tab布局WCardMainBorderLayout通过反射出来的大小是960*480

1
designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/OnlineWidgetBlock.java

@ -189,6 +189,7 @@ public class OnlineWidgetBlock extends AbstractOnlineWidgetBlock {
ShareUIUtils.showErrorMessageDialog(Toolkit.i18nText("Fine-Design_Share_Drag_Error_Info"));
return;
}
compatibleProcessAbsoluteLayoutResolution(creatorSource);
creatorSource.setWidgetID(UUID.randomUUID().toString());
((AbstractBorderStyleWidget) creatorSource).addWidgetAttrMark(new SharableAttrMark(true));
SharableWidgetProvider bindInfo = ShareUtils.getElCaseBindInfoById(shareId);

24
designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/PreviewWidgetBlock.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe.share.ui.block;
import com.fr.concurrent.NamedThreadFactory;
import com.fr.design.DesignerEnvManager;
import com.fr.design.fit.common.TemplateTool;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.EastRegionContainerPane;
@ -12,7 +13,12 @@ import com.fr.design.mainframe.share.collect.ComponentCollector;
import com.fr.design.mainframe.share.ui.online.CarouselStateManger;
import com.fr.design.mainframe.share.ui.online.embed.AnimatePopupDialog;
import com.fr.design.mainframe.share.ui.online.embed.FirstDragAnimateStateManager;
import com.fr.form.main.Form;
import com.fr.form.main.WidgetGather;
import com.fr.form.share.constants.ShareComponentConstants;
import com.fr.form.ui.Widget;
import com.fr.form.ui.container.WAbsoluteLayout;
import com.fr.general.FRScreen;
import com.fr.module.ModuleContext;
import org.jetbrains.annotations.NotNull;
import javax.swing.ImageIcon;
@ -285,4 +291,22 @@ public abstract class PreviewWidgetBlock<T> extends JPanel implements MouseListe
}
//新自适应的模板由于内部的尺寸都是未经过缩放过的值,所以对应的设计分辨率值也要保持正常分辨率p1440
protected void compatibleProcessAbsoluteLayoutResolution(Widget widget) {
if (!TemplateTool.isCurrentEditingNewJForm()) {
return;
}
Form.traversalWidget(widget, new WidgetGather() {
@Override
public void dealWith(Widget widget) {
((WAbsoluteLayout) widget).setDesigningResolution(FRScreen.p1440.getDimension());
}
@Override
public boolean dealWithAllCards() {
return true;
}
}, WAbsoluteLayout.class);
}
}

Loading…
Cancel
Save