Browse Source

REPORT-32317 cpt滚动条缩放问题

在更改了界面的比例方法中,增加更新滚动条的宽度的逻辑
bugfix/10.0
Yvan 4 years ago
parent
commit
7520a6edef
  1. 9
      designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java

9
designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java

@ -456,12 +456,17 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
grid.setHorizontalExtent(GridUtils.getExtentValue(0, columnWidthList, grid.getWidth(), resolution)); grid.setHorizontalExtent(GridUtils.getExtentValue(0, columnWidthList, grid.getWidth(), resolution));
elementCasePane.getGrid().updateUI(); elementCasePane.getGrid().updateUI();
//更新Column和Row //更新Column和Row
((DynamicScrollBar) elementCasePane.getVerticalScrollBar()).setDpi(resolution); DynamicScrollBar verticalScrollBar = (DynamicScrollBar) elementCasePane.getVerticalScrollBar();
((DynamicScrollBar) elementCasePane.getHorizontalScrollBar()).setDpi(resolution); DynamicScrollBar horizontalScrollBar = (DynamicScrollBar) elementCasePane.getHorizontalScrollBar();
verticalScrollBar.setDpi(resolution);
horizontalScrollBar.setDpi(resolution);
elementCasePane.getGridColumn().setResolution(resolution); elementCasePane.getGridColumn().setResolution(resolution);
elementCasePane.getGridColumn().updateUI(); elementCasePane.getGridColumn().updateUI();
elementCasePane.getGridRow().setResolution(resolution); elementCasePane.getGridRow().setResolution(resolution);
elementCasePane.getGridRow().updateUI(); elementCasePane.getGridRow().updateUI();
//Yvan:更新滚动条值(主要是为了重置滚动条里的BoundedRangeModel的extent值),使之随着界面缩放
verticalScrollBar.setValue(verticalScrollBar.getValue());
horizontalScrollBar.setValue(horizontalScrollBar.getValue());
} }
if (polyDezi != null) { if (polyDezi != null) {
polyDezi.setResolution(resolution); polyDezi.setResolution(resolution);

Loading…
Cancel
Save