Browse Source

无jira任务,属性修改为私有

master
yaoh.wu 8 years ago
parent
commit
ae2dac569b
  1. 42
      designer_form/src/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java

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

@ -19,37 +19,37 @@ import java.util.*;
* Created by zhouping on 2016/8/18.
*/
public class FRBodyLayoutAdapter extends AbstractLayoutAdapter {
protected static final int COMP_TOP = 1;
protected static final int COMP_BOTTOM = 2;
protected static final int COMP_LEFT = 3;
protected static final int COMP_RIGHT = 4;
private static final int COMP_TOP = 1;
private static final int COMP_BOTTOM = 2;
private static final int COMP_LEFT = 3;
private static final int COMP_RIGHT = 4;
private static final int COMP_LEFT_TOP = 5;
private static final int COMP_LEFT_BOTTOM = 6;
private static final int COMP_RIGHT_TOP = 7;
private static final int COMP_RIGHT_BOTTOM = 8;
private static final int INDEX_ZERO = 0;
protected static final double TOP_HALF = 0.25;
protected static final double BOTTOM_HALF = 0.75;
protected static final int DEFAULT_AREA_LENGTH = 5; //判断交叉区域范围的默认长度
protected static final int BORDER_PROPORTION = 10; //边界三等分或交叉区域大小取组件1/10和默认大小
private static final double TOP_HALF = 0.25;
private static final double BOTTOM_HALF = 0.75;
private static final int DEFAULT_AREA_LENGTH = 5; //判断交叉区域范围的默认长度
private static final int BORDER_PROPORTION = 10; //边界三等分或交叉区域大小取组件1/10和默认大小
protected int trisectAreaDirect = 0;
protected int crossPointAreaDirect = 0;
private int trisectAreaDirect = 0;
private int crossPointAreaDirect = 0;
// 增加删除拉伸控件用的临时list
protected java.util.List<Component> rightComps;
protected java.util.List<Component> leftComps;
protected java.util.List<Component> downComps;
protected java.util.List<Component> upComps;
private java.util.List<Component> rightComps;
private java.util.List<Component> leftComps;
private java.util.List<Component> downComps;
private java.util.List<Component> upComps;
// 三等分时计算对应侧的组件
protected boolean isFindRelatedComps = false;
private boolean isFindRelatedComps = false;
// 渲染时只计算对应的bounds而不调整
private boolean isCalculateChildPos = false;
private int[] childPosition = null; //painter用的位置
protected int minWidth = 0; // 最小尺寸,由于屏幕百分比里不同,显示的最小大小也不同
protected int minHeight = 0;
protected int actualVal = 0; // 存在间隔时,add move drag 判断对齐等都要考虑
protected PaddingMargin margin; // 布局容器边距
private int minWidth = 0; // 最小尺寸,由于屏幕百分比里不同,显示的最小大小也不同
private int minHeight = 0;
private int actualVal = 0; // 存在间隔时,add move drag 判断对齐等都要考虑
private PaddingMargin margin; // 布局容器边距
/**
* 在添加组件状态时当鼠标移动到某个容器上方时如果该容器有布局管理器则会调用该布局
@ -629,10 +629,8 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter {
private int getPositionOfFix(XCreator currentCreator, int x, int y) {
int position = 0;
XLayoutContainer cardLayout = ((XWCardMainBorderLayout) currentCreator).getCardPart();
XLayoutContainer container = (XLayoutContainer) cardLayout.getComponent(0);
Rectangle rect = ComponentUtils.getRelativeBounds(container);
/*
* 为了获取到鼠标drop位置的控件
* 我们之前已经将y值变为相对坐标值
@ -644,11 +642,9 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter {
if (currentCreator.getParent().getParent().getComponent(0) instanceof XWParameterLayout) {
int high = currentCreator.getParent().getParent().getComponent(0).getHeight();
y = y + WCardMainBorderLayout.TAB_HEIGHT + high;
} else {
y = y + WCardMainBorderLayout.TAB_HEIGHT;
}
int tempX = x - rect.x;
int tempY = y - rect.y;
int containerX = container.getX();

Loading…
Cancel
Save