Browse Source

REPORT-32427 设计器操作决策报表TAB块,出现问题

bugfix/10.0
Henry.Wang 4 years ago
parent
commit
80ea9bb843
  1. 22
      designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java

22
designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java

@ -114,6 +114,15 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter {
XCreator creator = (XCreator) container.getComponent(i); XCreator creator = (XCreator) container.getComponent(i);
creator.updateChildBound(minHeight); creator.updateChildBound(minHeight);
creator.setBackupBound(creator.getBounds()); creator.setBackupBound(creator.getBounds());
//tab布局用到
ArrayList<?> childrenList = creator.getTargetChildrenList();
for (int j = 0; j < childrenList.size(); j++) {
XWTabFitLayout tabLayout = (XWTabFitLayout) childrenList.get(j);
for (int m = 0; m < tabLayout.getComponentCount(); m++) {
XCreator childCreator = tabLayout.getXCreator(m);
childCreator.setBackupBound(childCreator.getBounds());
}
}
} }
} }
@ -1039,15 +1048,22 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter {
XWTabFitLayout tabLayout = (XWTabFitLayout) childrenList.get(j); XWTabFitLayout tabLayout = (XWTabFitLayout) childrenList.get(j);
tabLayout.setBackupBound(tabLayout.getBounds()); tabLayout.setBackupBound(tabLayout.getBounds());
int refSize = isHor ? tabLayout.getWidth() : tabLayout.getHeight(); int refSize = isHor ? tabLayout.getWidth() : tabLayout.getHeight();
double percent = (double) offset / refSize; //double percent = (double) offset / refSize;
double percent = offset / (double) (refSize - offset);
if (percent < 0 && !tabLayout.canReduce(percent)) { if (percent < 0 && !tabLayout.canReduce(percent)) {
return; return;
} }
setAdjustedSize(tabLayout, offset, isHor); //setAdjustedSize(tabLayout, offset, isHor);
// for (int m = 0; m < tabLayout.getComponentCount(); m++) {
// XCreator childCreator = tabLayout.getXCreator(m);
// WAbsoluteLayout.BoundsWidget wgt = (WAbsoluteLayout.BoundsWidget) tabLayout.toData().getBoundsWidget(childCreator.toData());
// wgt.setBounds(tabLayout.getComponent(m).getBounds());
// }
for (int m = 0; m < tabLayout.getComponentCount(); m++) { for (int m = 0; m < tabLayout.getComponentCount(); m++) {
XCreator childCreator = tabLayout.getXCreator(m); XCreator childCreator = tabLayout.getXCreator(m);
WAbsoluteLayout.BoundsWidget wgt = (WAbsoluteLayout.BoundsWidget) tabLayout.toData().getBoundsWidget(childCreator.toData()); WAbsoluteLayout.BoundsWidget wgt = (WAbsoluteLayout.BoundsWidget) tabLayout.toData().getBoundsWidget(childCreator.toData());
wgt.setBounds(tabLayout.getComponent(m).getBounds()); wgt.setBounds(childCreator.getBackupBound());
wgt.setBackupBounds(childCreator.getBackupBound());
} }
adjustCreatorsSize(percent, tabLayout, isHor); adjustCreatorsSize(percent, tabLayout, isHor);
} }

Loading…
Cancel
Save