Browse Source

MOBILE-26530 && MOBILE-26197

feature/big-screen
hades 5 years ago
parent
commit
8499541ae9
  1. 12
      designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java
  2. 12
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/MobileAdvanceDefinePane.java

12
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();
}
}
}

12
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<String> iterator = wSortLayout.getMobileWidgetIterator();
while (iterator.hasNext()) {
Widget widget = form.getWidgetByName(iterator.next());
List<String> 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;
}

Loading…
Cancel
Save