Browse Source

Merge pull request #458 in BA/design from ~ZHOUPING/design:dev to dev

* commit '1ac33db0c254d05ec7a3381a714c89d8677cdf11':
  REPORT-750 表单共创内测问题
master
superman 8 years ago
parent
commit
8eb0ab2f15
  1. 10
      designer_form/src/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java
  2. 8
      designer_form/src/com/fr/design/mainframe/FormArea.java

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

@ -42,4 +42,14 @@ public class XWAbsoluteBodyLayout extends XWAbsoluteLayout {
public void setEditable(boolean isEditable) { public void setEditable(boolean isEditable) {
super.setEditable(true); super.setEditable(true);
} }
/**
* 该组件是否可以拖拽(表单中绝对布局不可以拖拽)
*
* @return 是则返回true
*/
@Override
public boolean isSupportDrag() {
return false;
}
} }

8
designer_form/src/com/fr/design/mainframe/FormArea.java

@ -433,17 +433,17 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
if (rec.width <= dWidth&&rec.x < getHorizontalValue()) { if (rec.width <= dWidth&&rec.x < getHorizontalValue()) {
//在边界内部且x位置小于水平滚动条的值 //在边界内部且x位置小于水平滚动条的值
horScrollBar.setValue(rec.x); horScrollBar.setValue(rec.x);
} else if (rec.x+rec.width > dWidth) { } else if (rec.x + rec.width > dWidth + horizontalValue) {
//超出边界宽度 //超出边界宽度
horScrollBar.setValue(rec.x+rec.width-dWidth); horScrollBar.setValue(rec.x + rec.width - dWidth);
} }
int dHeight = getDesignerHeight(); int dHeight = getDesignerHeight();
if (rec.height < dHeight && rec.y < getVerticalValue()) { if (rec.height < dHeight && rec.y < getVerticalValue()) {
//在边界内部且y位置小于竖直滚动条的值 //在边界内部且y位置小于竖直滚动条的值
verScrollBar.setValue(rec.y); verScrollBar.setValue(rec.y);
} else if (rec.y+rec.height > dHeight) { } else if (rec.y + rec.height > dHeight + verticalValue) {
//超出边界高度 //超出边界高度
verScrollBar.setValue(rec.y+rec.height-dHeight); verScrollBar.setValue(rec.y + rec.height - dHeight);
} }
} }

Loading…
Cancel
Save