From 7520a6edefc2ded2145dc754c45ff4b872fa9baa Mon Sep 17 00:00:00 2001 From: Yvan Date: Fri, 7 Aug 2020 16:38:08 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-32317=20cpt=E6=BB=9A=E5=8A=A8=E6=9D=A1?= =?UTF-8?q?=E7=BC=A9=E6=94=BE=E9=97=AE=E9=A2=98=20=E5=9C=A8=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=E4=BA=86=E7=95=8C=E9=9D=A2=E7=9A=84=E6=AF=94=E4=BE=8B?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E4=B8=AD=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=BB=9A=E5=8A=A8=E6=9D=A1=E7=9A=84=E5=AE=BD=E5=BA=A6?= =?UTF-8?q?=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/JWorkBook.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java b/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java index b68833f83..80c8b2d0b 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java @@ -456,12 +456,17 @@ public class JWorkBook extends JTemplate { grid.setHorizontalExtent(GridUtils.getExtentValue(0, columnWidthList, grid.getWidth(), resolution)); elementCasePane.getGrid().updateUI(); //更新Column和Row - ((DynamicScrollBar) elementCasePane.getVerticalScrollBar()).setDpi(resolution); - ((DynamicScrollBar) elementCasePane.getHorizontalScrollBar()).setDpi(resolution); + DynamicScrollBar verticalScrollBar = (DynamicScrollBar) elementCasePane.getVerticalScrollBar(); + DynamicScrollBar horizontalScrollBar = (DynamicScrollBar) elementCasePane.getHorizontalScrollBar(); + verticalScrollBar.setDpi(resolution); + horizontalScrollBar.setDpi(resolution); elementCasePane.getGridColumn().setResolution(resolution); elementCasePane.getGridColumn().updateUI(); elementCasePane.getGridRow().setResolution(resolution); elementCasePane.getGridRow().updateUI(); + //Yvan:更新滚动条值(主要是为了重置滚动条里的BoundedRangeModel的extent值),使之随着界面缩放 + verticalScrollBar.setValue(verticalScrollBar.getValue()); + horizontalScrollBar.setValue(horizontalScrollBar.getValue()); } if (polyDezi != null) { polyDezi.setResolution(resolution);