Browse Source

Merge pull request #774 in BA/design from ~ZHOUPING/design:release to release

* commit 'fc9adf928ebdd7a615cf21c29fca4c5545809646':
  REPORT-2171 表单里嵌套tab后, 滚动条丢失了, 所有自适应都这样
master
superman 8 years ago
parent
commit
664124fdb7
  1. 10
      designer_form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java
  2. 1
      designer_form/src/com/fr/design/designer/creator/XWFitLayout.java

10
designer_form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java

@ -8,6 +8,7 @@ import java.awt.event.ContainerEvent;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.beans.IntrospectionException; import java.beans.IntrospectionException;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.AdapterBus;
@ -16,6 +17,7 @@ import com.fr.design.designer.beans.LayoutAdapter;
import com.fr.design.designer.beans.adapters.layout.FRAbsoluteLayoutAdapter; import com.fr.design.designer.beans.adapters.layout.FRAbsoluteLayoutAdapter;
import com.fr.design.designer.beans.location.Direction; import com.fr.design.designer.beans.location.Direction;
import com.fr.design.designer.beans.models.SelectionModel; import com.fr.design.designer.beans.models.SelectionModel;
import com.fr.design.designer.creator.cardlayout.XWTabFitLayout;
import com.fr.design.form.layout.FRAbsoluteLayout; import com.fr.design.form.layout.FRAbsoluteLayout;
import com.fr.design.icon.IconPathConstants; import com.fr.design.icon.IconPathConstants;
import com.fr.design.mainframe.*; import com.fr.design.mainframe.*;
@ -154,6 +156,14 @@ public class XWAbsoluteLayout extends XLayoutContainer {
if (xCreator.acceptType(XWAbsoluteLayout.class)){ if (xCreator.acceptType(XWAbsoluteLayout.class)){
((XWAbsoluteLayout) xCreator).updateBoundsWidget(); ((XWAbsoluteLayout) xCreator).updateBoundsWidget();
} }
// 如果子组件时tab布局,则tab布局内部的组件的wiget也要更新,否则保存后重新打开大小不对
ArrayList<?> childrenList = xCreator.getTargetChildrenList();
if(!childrenList.isEmpty()){
for(int i=0; i<childrenList.size(); i++){
XWTabFitLayout tabLayout = (XWTabFitLayout) childrenList.get(i);
tabLayout.updateBoundsWidget();
}
}
BoundsWidget boundsWidget = layout.getBoundsWidget(xCreator.toData()); BoundsWidget boundsWidget = layout.getBoundsWidget(xCreator.toData());
Rectangle rectangle = dealWidgetBound(xCreator.getBounds()); Rectangle rectangle = dealWidgetBound(xCreator.getBounds());
} }

1
designer_form/src/com/fr/design/designer/creator/XWFitLayout.java

@ -759,6 +759,7 @@ public class XWFitLayout extends XLayoutContainer {
//如果子组件是绝对布局,则内部的widget也要更新 //如果子组件是绝对布局,则内部的widget也要更新
if (creator.acceptType(XWAbsoluteLayout.class)){ if (creator.acceptType(XWAbsoluteLayout.class)){
((XWAbsoluteLayout) creator).updateBoundsWidget(); ((XWAbsoluteLayout) creator).updateBoundsWidget();
creator.setBackupBound(creator.getBounds());
} }
} }
layout.setContainerHeight(containerHeight); layout.setContainerHeight(containerHeight);

Loading…
Cancel
Save