1 21 22 package org.armedbear.j; 23 24 import javax.swing.JScrollBar ; 25 26 public final class VerticalScrollBar extends JScrollBar  27 { 28 private Editor editor; 29 private Display display; 30 31 public VerticalScrollBar(Editor editor) 32 { 33 super(); 34 this.editor = editor; 35 display = editor.getDisplay(); 36 } 37 38 public final int getUnitIncrement(int direction) 39 { 40 return display.getCharHeight() * editor.getBuffer().getIntegerProperty(Property.VERTICAL_SCROLL_INCREMENT); 41 } 42 43 public final int getBlockIncrement(int direction) 44 { 45 return display.getHeight(); 46 } 47 } 48 | Popular Tags |