From 9c694f26fc87fe23fc85d5ecefdc915bcd0ae6a9 Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 7 Sep 2018 17:32:15 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-11044=20frm=E4=B8=AD=E9=80=89=E4=B8=AD?= =?UTF-8?q?=E5=9D=97=E6=97=B6=EF=BC=8C=E8=80=81=E6=98=AF=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/FormArea.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java b/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java index 762b412f1..b42d1b41e 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormArea.java @@ -540,16 +540,16 @@ public class FormArea extends JComponent implements ScrollRulerComponent { layout(); if (isValid) { XLayoutContainer root = designer.getRootComponent(); - setScrollBarProperties(root.getWidth() - designer.getWidth(), horScrollBar); + setScrollBarProperties(root.getWidth() - designer.getWidth(), horScrollBar, horizontalValue); //计算滚动条值的时候应该算上参数面板的高度 - setScrollBarProperties(designer.getParaHeight() + root.getHeight() - designer.getHeight(), verScrollBar); + setScrollBarProperties(designer.getParaHeight() + root.getHeight() - designer.getHeight(), verScrollBar, verticalValue); } } /** * 设置滚动条的属性 */ - private void setScrollBarProperties(int value, FormScrollBar bar) { + private void setScrollBarProperties(int value, FormScrollBar bar, int oldValue) { if (value == 0 && isScrollNotVisible(bar)) { return; } @@ -560,12 +560,11 @@ public class FormArea extends JComponent implements ScrollRulerComponent { bar.setValue(0); bar.setEnabled(false); } else { - //参数面板拖拽过程中value一直为当前value - int oldValue = verticalValue; setScrollBarMax(value, bar); bar.setEnabled(true); bar.setMaximum(value); bar.setValue(value); + //参数面板拖拽过程中value一直为当前value bar.setValue(oldValue); } }