Browse Source

REPORT-66174 组件复用-tab块组件创建的复用组件,原始尺寸没超过500*300,但是复用组件的尺寸和原始尺寸不一致了

release/10.0
方磊 3 years ago
parent
commit
ba9f7f759d
  1. 7
      designer-form/src/main/java/com/fr/design/mainframe/share/util/ShareComponentUtils.java

7
designer-form/src/main/java/com/fr/design/mainframe/share/util/ShareComponentUtils.java

@ -8,14 +8,11 @@ import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWTitleLayout; import com.fr.design.designer.creator.XWTitleLayout;
import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.FormSelection;
import com.fr.design.mainframe.JForm;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.form.share.SharableWidgetProvider; import com.fr.form.share.SharableWidgetProvider;
import com.fr.form.share.bean.ShareLayoutWidget; import com.fr.form.share.bean.ShareLayoutWidget;
import com.fr.form.share.constants.ComponentPath; import com.fr.form.share.constants.ComponentPath;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
@ -38,9 +35,7 @@ public class ShareComponentUtils {
public static XCreator createXCreator(Widget creatorSource, String shareId, SharableWidgetProvider provider) { public static XCreator createXCreator(Widget creatorSource, String shareId, SharableWidgetProvider provider) {
XCreator xCreator; XCreator xCreator;
if (creatorSource instanceof WCardMainBorderLayout) { if (creatorSource instanceof ShareLayoutWidget) {
xCreator = XCreatorUtils.createXCreator(creatorSource, new Dimension(500, 300));
} else if (creatorSource instanceof ShareLayoutWidget) {
xCreator = XCreatorUtils.createXCreator(((ShareLayoutWidget) creatorSource).getWidget(), new Dimension(provider.getWidth(), provider.getHeight())); xCreator = XCreatorUtils.createXCreator(((ShareLayoutWidget) creatorSource).getWidget(), new Dimension(provider.getWidth(), provider.getHeight()));
} else { } else {
xCreator = XCreatorUtils.createXCreator(creatorSource, new Dimension(provider.getWidth(), provider.getHeight())); xCreator = XCreatorUtils.createXCreator(creatorSource, new Dimension(provider.getWidth(), provider.getHeight()));

Loading…
Cancel
Save