src/solaris/classes/sun/awt/X11/XScrollbarPeer.java

Print this page




 139         }
 140 
 141         switch (mouseEvent.getID()) {
 142           case MouseEvent.MOUSE_PRESSED:
 143               target.requestFocus();
 144               tsb.handleMouseEvent(id, modifiers,x,y);
 145               break;
 146 
 147           case MouseEvent.MOUSE_RELEASED:
 148               tsb.handleMouseEvent(id, modifiers,x,y);
 149               break;
 150 
 151           case MouseEvent.MOUSE_DRAGGED:
 152               tsb.handleMouseEvent(id, modifiers,x,y);
 153               break;
 154         }
 155     }
 156 
 157     public void handleJavaKeyEvent(KeyEvent event) {
 158         super.handleJavaKeyEvent(event);
 159         if (log.isLoggable(PlatformLogger.FINEST)) log.finer("KeyEvent on scrollbar: " + event);


 160         if (!(event.isConsumed()) && event.getID() == KeyEvent.KEY_RELEASED) {
 161             switch(event.getKeyCode()) {
 162             case KeyEvent.VK_UP:
 163                 log.finer("Scrolling up");
 164                 tsb.notifyValue(tsb.getValue() - tsb.getUnitIncrement());
 165                 break;
 166             case KeyEvent.VK_DOWN:
 167                 log.finer("Scrolling down");
 168                 tsb.notifyValue(tsb.getValue() + tsb.getUnitIncrement());
 169                 break;
 170             case KeyEvent.VK_LEFT:
 171                 log.finer("Scrolling up");
 172                 tsb.notifyValue(tsb.getValue() - tsb.getUnitIncrement());
 173                 break;
 174             case KeyEvent.VK_RIGHT:
 175                 log.finer("Scrolling down");
 176                 tsb.notifyValue(tsb.getValue() + tsb.getUnitIncrement());
 177                 break;
 178             case KeyEvent.VK_PAGE_UP:
 179                 log.finer("Scrolling page up");




 139         }
 140 
 141         switch (mouseEvent.getID()) {
 142           case MouseEvent.MOUSE_PRESSED:
 143               target.requestFocus();
 144               tsb.handleMouseEvent(id, modifiers,x,y);
 145               break;
 146 
 147           case MouseEvent.MOUSE_RELEASED:
 148               tsb.handleMouseEvent(id, modifiers,x,y);
 149               break;
 150 
 151           case MouseEvent.MOUSE_DRAGGED:
 152               tsb.handleMouseEvent(id, modifiers,x,y);
 153               break;
 154         }
 155     }
 156 
 157     public void handleJavaKeyEvent(KeyEvent event) {
 158         super.handleJavaKeyEvent(event);
 159         if (log.isLoggable(PlatformLogger.FINEST)) {
 160             log.finer("KeyEvent on scrollbar: " + event);
 161         }
 162         if (!(event.isConsumed()) && event.getID() == KeyEvent.KEY_RELEASED) {
 163             switch(event.getKeyCode()) {
 164             case KeyEvent.VK_UP:
 165                 log.finer("Scrolling up");
 166                 tsb.notifyValue(tsb.getValue() - tsb.getUnitIncrement());
 167                 break;
 168             case KeyEvent.VK_DOWN:
 169                 log.finer("Scrolling down");
 170                 tsb.notifyValue(tsb.getValue() + tsb.getUnitIncrement());
 171                 break;
 172             case KeyEvent.VK_LEFT:
 173                 log.finer("Scrolling up");
 174                 tsb.notifyValue(tsb.getValue() - tsb.getUnitIncrement());
 175                 break;
 176             case KeyEvent.VK_RIGHT:
 177                 log.finer("Scrolling down");
 178                 tsb.notifyValue(tsb.getValue() + tsb.getUnitIncrement());
 179                 break;
 180             case KeyEvent.VK_PAGE_UP:
 181                 log.finer("Scrolling page up");