File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
sources/net.sf.j2s.java.core/src/swingjs/plaf Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ void setScrollBarExtentAndCSS() {
149149 public void scrollByBlock (int direction , int val0 ) {
150150 // general click in track
151151 JScrollBar sb = (JScrollBar ) jc ;
152- int delta = sb . getBlockIncrement ();
152+ int delta = getBlockIncrement ();
153153 if (delta == Integer .MIN_VALUE && direction > 0 )
154154 return ;
155155 delta *= (direction > 0 ? POSITIVE_SCROLL : NEGATIVE_SCROLL );
@@ -176,7 +176,14 @@ public void scrollByBlock(int direction, int val0) {
176176// public void jqueryStop(Object event, Object ui) {
177177// }
178178
179- @ Override
179+ private int getBlockIncrement () {
180+ JScrollBar sb = (JScrollBar ) jc ;
181+ if (myScrollPaneUI == null )
182+ return sb .getBlockIncrement ();
183+ return sb .getVisibleAmount ();
184+ }
185+
186+ @ Override
180187 public void scrollByUnit (int direction ) {
181188 // scroll click at end of scrollbar
182189 JScrollBar sb = (JScrollBar ) jc ;
You can’t perform that action at this time.
0 commit comments