From 8499541ae917e94c20fe342e1c91e24b1cdfec41 Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 15 Apr 2020 10:42:02 +0800 Subject: [PATCH] MOBILE-26530 && MOBILE-26197 --- .../fr/design/designer/creator/XWAbsoluteLayout.java | 12 ++++++++++++ .../ui/designer/mobile/MobileAdvanceDefinePane.java | 12 +++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java index 56fcf6486..22d702dfd 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java @@ -13,8 +13,11 @@ import com.fr.design.designer.beans.adapters.layout.FRAbsoluteLayoutAdapter; import com.fr.design.designer.beans.location.Direction; import com.fr.design.designer.beans.models.SelectionModel; import com.fr.design.designer.creator.cardlayout.XWTabFitLayout; +import com.fr.design.designer.properties.mobile.MobileBooKMarkUsePropertyUI; import com.fr.design.form.layout.FRAbsoluteLayout; +import com.fr.design.form.util.FormDesignerUtils; import com.fr.design.form.util.XCreatorConstants; +import com.fr.design.fun.WidgetPropertyUIProvider; import com.fr.design.icon.IconPathConstants; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.EditingMouseListener; @@ -590,4 +593,13 @@ public class XWAbsoluteLayout extends XLayoutContainer { public boolean isSupportShared() { return true; } + + @Override + public WidgetPropertyUIProvider[] getWidgetPropertyUIProviders() { + if (FormDesignerUtils.isAppRelayout(WidgetPropertyPane.getInstance().getEditingFormDesigner())) { + return new WidgetPropertyUIProvider[] {new MobileBooKMarkUsePropertyUI(this)}; + } else { + return super.getWidgetPropertyUIProviders(); + } + } } diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/MobileAdvanceDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/MobileAdvanceDefinePane.java index 587ea5395..34f6a7adf 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/MobileAdvanceDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/MobileAdvanceDefinePane.java @@ -20,6 +20,7 @@ import com.fr.form.ui.Widget; import com.fr.form.ui.container.WLayout; import com.fr.form.ui.container.WSortLayout; import com.fr.form.ui.mobile.MobileBookMark; +import com.fr.form.ui.widget.CRBoundsWidget; import com.fr.general.ComparatorUtils; import com.fr.general.IOUtils; import com.fr.stable.StringUtils; @@ -33,6 +34,7 @@ import java.awt.event.FocusEvent; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.util.Iterator; +import java.util.List; /** * @author hades @@ -180,12 +182,16 @@ public class MobileAdvanceDefinePane extends MobileWidgetDefinePane { Form form = WidgetPropertyPane.getInstance().getEditingFormDesigner().getTarget(); WLayout container = form.getContainer(); WSortLayout wSortLayout = (WSortLayout) container.getWidget(container.getWidgetCount() - 1); - Iterator iterator = wSortLayout.getMobileWidgetIterator(); - while (iterator.hasNext()) { - Widget widget = form.getWidgetByName(iterator.next()); + List list = wSortLayout.getOrderedMobileWidgetList(); + for (String value : list) { + Widget widget = form.getWidgetByName(value); if (widget != null && ComparatorUtils.equals(widget.getMobileBookMark().getBookMarkName(), name)) { return true; } + CRBoundsWidget boundsWidget = (CRBoundsWidget) wSortLayout.getWidget(value); + if (boundsWidget != null && ComparatorUtils.equals(boundsWidget.getWidget().getMobileBookMark().getBookMarkName(), name)) { + return true; + } } return false; }