Browse Source

REPORT-1838 frm里多层tab的情况下调整报表块大小有问题

master
zhouping 8 years ago
parent
commit
5aeaf11698
  1. 6
      designer_form/src/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java
  2. 9
      designer_form/src/com/fr/design/designer/beans/adapters/layout/FRTabFitLayoutAdapter.java

6
designer_form/src/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java

@ -277,6 +277,10 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter {
super.clearCompsList();
}
protected Rectangle getLayoutBound(XWCardMainBorderLayout mainLayout){
return mainLayout.getBounds();
}
private Rectangle adjustBackupBound(Rectangle backupBound, XWCardMainBorderLayout mainLayout) {
// 参数界面高度对纵坐标产生的影响
JForm jform = (JForm) (HistoryTemplateListPane.getInstance().getCurrentEditingTemplate());
@ -284,7 +288,7 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter {
backupBound.y -= jform.getFormDesign().getParaHeight();
}
Rectangle rec = mainLayout.getBounds();
Rectangle rec = getLayoutBound(mainLayout);
// XWTabLayout里面的横纵坐标收到外层XWCardMainBorderLayout的横纵坐标影响
// 减掉之后可以按照它原来的逻辑执行
backupBound.x -= rec.x;

9
designer_form/src/com/fr/design/designer/beans/adapters/layout/FRTabFitLayoutAdapter.java

@ -4,13 +4,12 @@
package com.fr.design.designer.beans.adapters.layout;
import java.awt.Rectangle;
import com.fr.design.beans.GroupModel;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWidgetCreator;
import com.fr.design.designer.creator.cardlayout.XWCardLayout;
import com.fr.design.designer.creator.cardlayout.XWCardMainBorderLayout;
import com.fr.design.designer.creator.cardlayout.XWTabFitLayout;
import com.fr.design.designer.properties.FRTabFitLayoutPropertiesGroupModel;
import com.fr.design.utils.ComponentUtils;
@ -18,6 +17,8 @@ import com.fr.form.ui.LayoutBorderStyle;
import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout;
import com.fr.general.ComparatorUtils;
import java.awt.*;
/**
* tab布局tabFit适配器
*
@ -91,4 +92,8 @@ public class FRTabFitLayoutAdapter extends FRFitLayoutAdapter {
}
return y;
}
protected Rectangle getLayoutBound(XWCardMainBorderLayout mainLayout){
return ComponentUtils.getRelativeBounds(mainLayout);
}
}
Loading…
Cancel
Save