diff --git a/designer_form/src/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java b/designer_form/src/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java index b9fea0a0bf..e4008df6f1 100644 --- a/designer_form/src/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java @@ -42,4 +42,14 @@ public class XWAbsoluteBodyLayout extends XWAbsoluteLayout { public void setEditable(boolean isEditable) { super.setEditable(true); } + + /** + * 该组件是否可以拖拽(表单中绝对布局不可以拖拽) + * + * @return 是则返回true + */ + @Override + public boolean isSupportDrag() { + return false; + } } diff --git a/designer_form/src/com/fr/design/mainframe/FormArea.java b/designer_form/src/com/fr/design/mainframe/FormArea.java index 26f3b04903..4f6c86feef 100644 --- a/designer_form/src/com/fr/design/mainframe/FormArea.java +++ b/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()) { //在边界内部且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(); if (rec.height < dHeight && rec.y < getVerticalValue()) { //在边界内部且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); } }