Browse Source

REPORT-11473

final/10.0
Mata.Li 6 years ago
parent
commit
7e2cc5da13
  1. 12
      designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java
  2. 2
      designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java
  3. 2
      designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java

12
designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java

@ -5,7 +5,10 @@ import java.awt.Dimension;
import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.event.ContainerEvent;
import java.util.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import com.fr.design.designer.beans.LayoutAdapter;
import com.fr.design.designer.beans.adapters.layout.FRFitLayoutAdapter;
@ -29,6 +32,7 @@ import com.fr.general.FRScreen;
import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget;
import com.fr.stable.ArrayUtils;
import edu.emory.mathcs.backport.java.util.Arrays;
import javax.swing.JOptionPane;
@ -1213,7 +1217,7 @@ public class XWFitLayout extends XLayoutContainer {
return false;
}
public static boolean switch2FitBodyLayout(XCreator creator) {
public boolean switch2FitBodyLayout(XCreator creator) {
try {
XWFitLayout xfl = (XWFitLayout) creator.getBackupParent();
//备份一下组件间隔
@ -1262,7 +1266,7 @@ public class XWFitLayout extends XLayoutContainer {
}
}
private static void moveComponents2FitLayout(XWFitLayout xwFitLayout) {
private void moveComponents2FitLayout(XWFitLayout xwFitLayout) {
Component[] components = xwFitLayout.getComponents();
if (components.length == 0) {
xwFitLayout.updateBoundsWidget();
@ -1310,7 +1314,7 @@ public class XWFitLayout extends XLayoutContainer {
}
//以组件的位置来确定先后顺序,y小的在前,x小的在前
private static class ComparatorComponentLocation implements Comparator {
private class ComparatorComponentLocation implements Comparator {
@Override
public int compare(Object o1, Object o2) {
if (((Component) o1).getY() < ((Component) o2).getY()) {

2
designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java

@ -124,7 +124,7 @@ public class FRAbsoluteBodyLayoutDefinePane extends FRAbsoluteLayoutDefinePane {
if (layoutType == WBodyLayoutType.ABSOLUTE) {
((XWFitLayout) creator.getBackupParent()).toData().resetStyle();
if (state == WBodyLayoutType.FIT.getTypeValue()) {
XWFitLayout.switch2FitBodyLayout(creator);
((XWFitLayout)creator.getBackupParent()).switch2FitBodyLayout(creator);
}
}
layout.setBorderStyle((LayoutBorderStyle) borderStyleEditor.getValue());

2
designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java

@ -140,7 +140,7 @@ public class FRFitLayoutDefinePane extends AbstractDataModify<WFitLayout> {
//原单例面板populate根据当前样式populate属性面板,现加入移动端逻辑:可能需要根据面板属性改变样式
Form form = formDesigner.getTarget();
if (form.getFormMobileAttr().isMobileOnly() && form.getFormMobileAttr().isAdaptivePropertyAutoMatch()) {
XWFitLayout.switch2FitBodyLayout(rootLayout);
((XWFitLayout)formDesigner.getRootComponent()).switch2FitBodyLayout(rootLayout);
} else {
formDesigner.getSelectionModel().setSelectedCreators(
FormSelectionUtils.rebuildSelection(xWFitLayout, new Widget[]{selectedBodyLayout(formDesigner).toData()}));

Loading…
Cancel
Save