Browse Source

无任务 调整代码

master
yaoh.wu 8 years ago
parent
commit
d2730c56f7
  1. 6
      designer_form/src/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java
  2. 13
      designer_form/src/com/fr/design/designer/beans/adapters/layout/FRTabFitLayoutAdapter.java

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

@ -6,6 +6,7 @@ import com.fr.design.designer.creator.XWParameterLayout;
import com.fr.design.designer.creator.cardlayout.XWCardMainBorderLayout;
import com.fr.design.utils.ComponentUtils;
import com.fr.form.ui.PaddingMargin;
import com.fr.form.ui.container.WBorderLayout;
import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout;
import com.fr.general.ComparatorUtils;
@ -639,9 +640,8 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter {
* 又通过ComponentUtils.getRelativeBounds()方法获取到了绝对坐标
* 再次计算相对坐标所以将y值重新变成绝对坐标
* */
if (currentCreator.getParent().getParent().getComponent(0) instanceof XWParameterLayout) {
int high = currentCreator.getParent().getParent().getComponent(0).getHeight();
y = y + WCardMainBorderLayout.TAB_HEIGHT + high;
if (currentCreator.getBackupParent().getLocation().y == WBorderLayout.DEFAULT_SIZE) {
y = y + WCardMainBorderLayout.TAB_HEIGHT + WBorderLayout.DEFAULT_SIZE;
} else {
y = y + WCardMainBorderLayout.TAB_HEIGHT;
}

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

@ -15,6 +15,7 @@ import com.fr.design.designer.creator.cardlayout.XWTabFitLayout;
import com.fr.design.designer.properties.FRTabFitLayoutPropertiesGroupModel;
import com.fr.design.utils.ComponentUtils;
import com.fr.form.ui.LayoutBorderStyle;
import com.fr.form.ui.container.WBorderLayout;
import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout;
import com.fr.general.ComparatorUtils;
@ -92,16 +93,16 @@ public class FRTabFitLayoutAdapter extends FRFitLayoutAdapter {
private int adjustY(int y, XWTabFitLayout tabLayout) {
XWCardLayout cardLayout = (XWCardLayout) tabLayout.getBackupParent();
LayoutBorderStyle style = cardLayout.toData().getBorderStyle();
if (container.getParent().getComponent(0) instanceof XWParameterLayout) {
y = y - container.getParent().getComponent(0).getHeight() - container.getParent().getComponent(0).getY();
if (container.getLocation().y == WBorderLayout.DEFAULT_SIZE) {
y = y - WBorderLayout.DEFAULT_SIZE;
}
if (ComparatorUtils.equals(style.getType(), LayoutBorderStyle.TITLE)) {
y -= WCardMainBorderLayout.TAB_HEIGHT;
y = y - WCardMainBorderLayout.TAB_HEIGHT;
}
return y;
}
protected Rectangle getLayoutBound(XWCardMainBorderLayout mainLayout){
return ComponentUtils.getRelativeBounds(mainLayout);
}
protected Rectangle getLayoutBound(XWCardMainBorderLayout mainLayout) {
return ComponentUtils.getRelativeBounds(mainLayout);
}
}
Loading…
Cancel
Save