Browse Source

Merge pull request #1602 in DESIGN/design from ~HADES/design:release/10.0 to release/10.0

* commit 'fddd95418ed168948795da459a02c03626ddd7de':
  MOBILE-26198 && MOBILE-26189 交互调整
feature/big-screen
Hades 5 years ago
parent
commit
c2462990c4
  1. 4
      designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java
  2. 36
      designer-form/src/main/java/com/fr/design/designer/properties/mobile/MobileBookMarkCombinePropertyUI.java
  3. 3
      designer-form/src/main/java/com/fr/design/mainframe/WidgetPropertyPane.java
  4. 69
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/MobileBookMarkCombinePane.java
  5. 16
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileComponentFrozenPane.java

4
designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java

@ -16,7 +16,7 @@ import com.fr.design.designer.creator.XCreatorUtils;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWBorderLayout;
import com.fr.design.designer.creator.XWidgetCreator;
import com.fr.design.designer.properties.mobile.MobileBooKMarkUsePropertyUI;
import com.fr.design.designer.properties.mobile.MobileBookMarkCombinePropertyUI;
import com.fr.design.form.util.FormDesignerUtils;
import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.fun.WidgetPropertyUIProvider;
@ -518,7 +518,7 @@ public class XWCardMainBorderLayout extends XWBorderLayout {
@Override
public WidgetPropertyUIProvider[] getWidgetPropertyUIProviders() {
if (FormDesignerUtils.isAppRelayout(WidgetPropertyPane.getInstance().getEditingFormDesigner())) {
return new WidgetPropertyUIProvider[] {new MobileBooKMarkUsePropertyUI(this)};
return new WidgetPropertyUIProvider[] {new MobileBookMarkCombinePropertyUI(this)};
} else {
return super.getWidgetPropertyUIProviders();
}

36
designer-form/src/main/java/com/fr/design/designer/properties/mobile/MobileBookMarkCombinePropertyUI.java

@ -0,0 +1,36 @@
package com.fr.design.designer.properties.mobile;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.dialog.BasicPane;
import com.fr.design.fun.impl.AbstractWidgetPropertyUIProvider;
import com.fr.design.gui.itable.AbstractPropertyTable;
import com.fr.design.widget.ui.designer.mobile.MobileBookMarkCombinePane;
/**
* @author hades
* @version 10.0
* Created by hades on 2020/4/18
*/
public class MobileBookMarkCombinePropertyUI extends AbstractWidgetPropertyUIProvider {
private XCreator xCreator;
public MobileBookMarkCombinePropertyUI(XCreator xCreator) {
this.xCreator = xCreator;
}
@Override
public AbstractPropertyTable createWidgetAttrTable() {
return null;
}
@Override
public BasicPane createWidgetAttrPane() {
return new MobileBookMarkCombinePane(xCreator);
}
@Override
public String tableTitle() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Mobile_Attr");
}
}

3
designer-form/src/main/java/com/fr/design/mainframe/WidgetPropertyPane.java

@ -6,6 +6,7 @@ import com.fr.design.constants.UIConstants;
import com.fr.design.designer.beans.events.DesignerEditListener;
import com.fr.design.designer.beans.events.DesignerEvent;
import com.fr.design.designer.creator.*;
import com.fr.design.designer.creator.cardlayout.XWCardMainBorderLayout;
import com.fr.design.designer.creator.cardlayout.XWCardTagLayout;
import com.fr.design.designer.properties.EventPropertyTable;
import com.fr.design.designer.properties.mobile.MobileBookMarkPropertyUI;
@ -180,7 +181,7 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper
if (selection != null && xCreator != null) {
embeddedPropertyUIProviders = selection.getSelectedCreator().getWidgetPropertyUIProviders();
if(!designer.getDesignerMode().isFormParameterEditor()) {
if (!xCreator.acceptType(XWAbsoluteLayout.class, XWFitLayout.class, XWCardTagLayout.class) && FormDesignerUtils.isAppRelayout(designer)) {
if (!xCreator.acceptType(XWAbsoluteLayout.class, XWFitLayout.class, XWCardTagLayout.class, XWCardMainBorderLayout.class) && FormDesignerUtils.isAppRelayout(designer)) {
embeddedPropertyUIProviders = ArrayUtils.insert(0, embeddedPropertyUIProviders, new MobileBookMarkPropertyUI(xCreator));
}
if (xCreator.supportMobileStyle()) {

69
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/MobileBookMarkCombinePane.java

@ -0,0 +1,69 @@
package com.fr.design.widget.ui.designer.mobile;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.FormDesigner;
import com.fr.design.widget.ui.designer.mobile.component.MobileAdvanceInnerPane;
import com.fr.design.widget.ui.designer.mobile.component.MobileBookMarkUsePane;
import javax.swing.*;
import java.awt.*;
/**
* @author hades
* @version 10.0
* Created by hades on 2020/4/18
*/
public class MobileBookMarkCombinePane extends MobileWidgetDefinePane {
private MobileBookMarkUsePane mobileBookMarkUsePane;
private MobileAdvanceInnerPane mobileAdvanceInnerPane;
private XCreator xCreator;
public MobileBookMarkCombinePane(XCreator xCreator) {
this.xCreator = xCreator;
}
@Override
public void initPropertyGroups(Object source) {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel panel = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.mobileAdvanceInnerPane = new MobileAdvanceInnerPane(xCreator);
this.mobileBookMarkUsePane = new MobileBookMarkUsePane();
panel.add(this.mobileBookMarkUsePane, BorderLayout.NORTH);
panel.add(this.mobileAdvanceInnerPane, BorderLayout.CENTER);
UIExpandablePane uiExpandablePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, panel);
this.add(uiExpandablePane, BorderLayout.NORTH);
}
private void bindListeners2Widgets() {
reInitAllListeners();
AttributeChangeListener changeListener = new AttributeChangeListener() {
@Override
public void attributeChange() {
update();
}
};
this.addAttributeChangeListener(changeListener);
}
private void reInitAllListeners() {
initListener(this);
}
@Override
public void populate(FormDesigner designer) {
this.mobileBookMarkUsePane.populate(xCreator);
this.mobileAdvanceInnerPane.populate();
this.bindListeners2Widgets();
}
@Override
public void update() {
this.mobileBookMarkUsePane.update(xCreator);
this.mobileAdvanceInnerPane.update();
}
}

16
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileComponentFrozenPane.java

@ -61,6 +61,7 @@ public class MobileComponentFrozenPane extends BasicPane {
}
List<String> widgetList = ((WSortLayout) selectedModel).getNonContainerWidgetList();
widgetList.removeAll(frozenWidgets());
return widgetList.toArray(new String[0]);
}
@ -100,22 +101,21 @@ public class MobileComponentFrozenPane extends BasicPane {
map.put(value, false);
}
uiComboCheckBox.setSelectedValues(map);
if (ArrayUtils.isEmpty(uiComboCheckBox.getSelectedValues()) || !uiComboCheckBox.isEnabled()) {
uiComboCheckBox.setEnabled(!shouldFrozen());
}
}
private boolean shouldFrozen() {
private List<String> frozenWidgets() {
Form form = WidgetPropertyPane.getInstance().getEditingFormDesigner().getTarget();
WLayout container = form.getContainer();
WSortLayout wSortLayout = (WSortLayout) container.getWidget(container.getWidgetCount() - 1);
boolean frozen = false;
List<String> list = wSortLayout.getOrderedMobileWidgetList();
List<String> list = wSortLayout.getNonContainerWidgetList();
List<String> widgets = new ArrayList<>();
for (String value : list) {
CRBoundsWidget boundsWidget = (CRBoundsWidget) wSortLayout.getWidget(value);
frozen = frozen || boundsWidget.getWidget().getMobileBookMark().isUseBookMark();
if (boundsWidget.getWidget().getMobileBookMark().isUseBookMark()) {
widgets.add(value);
}
}
return frozen;
return widgets;
}
@Override

Loading…
Cancel
Save