516 517 518 /** 519 * Horizontal scrollbar listener. 520 */ 521 public class HSBChangeListener implements ChangeListener 522 { 523 524 // NOTE: This class exists only for backward compatibility. All 525 // its functionality has been moved into Handler. If you need to add 526 // new functionality add it to the Handler, but make sure this 527 // class calls into the Handler. 528 529 public void stateChanged(ChangeEvent e) 530 { 531 getHandler().stateChanged(e); 532 } 533 } 534 535 /** 536 * Returns a <code>PropertyChangeListener</code> that will be installed 537 * on the horizontal <code>JScrollBar</code>. 538 */ 539 private PropertyChangeListener createHSBPropertyChangeListener() { 540 return getHandler(); 541 } 542 543 /** 544 * Returns an instance of horizontal scroll bar {@code ChangeListener}. 545 * 546 * @return an instance of horizontal scroll bar {@code ChangeListener} 547 */ 548 protected ChangeListener createHSBChangeListener() { 549 return getHandler(); 550 } 551 552 553 /** 554 * Vertical scrollbar listener. 555 */ 556 public class VSBChangeListener implements ChangeListener 557 { 558 559 // NOTE: This class exists only for backward compatibility. All 560 // its functionality has been moved into Handler. If you need to add 561 // new functionality add it to the Handler, but make sure this 562 // class calls into the Handler. 563 564 public void stateChanged(ChangeEvent e) 565 { 566 getHandler().stateChanged(e); 567 } 568 } 569 570 571 /** 572 * Returns a <code>PropertyChangeListener</code> that will be installed 573 * on the vertical <code>JScrollBar</code>. 574 */ 575 private PropertyChangeListener createVSBPropertyChangeListener() { 576 return getHandler(); 577 } 578 579 /** 580 * Returns an instance of vertical scroll bar {@code ChangeListener}. 581 * 582 * @return an instance of vertical scroll bar {@code ChangeListener} 583 */ 584 protected ChangeListener createVSBChangeListener() { 585 return getHandler(); 586 } 587 588 /** 589 * MouseWheelHandler is an inner class which implements the 590 * MouseWheelListener interface. MouseWheelHandler responds to 591 * MouseWheelEvents by scrolling the JScrollPane appropriately. 592 * If the scroll pane's 593 * <code>isWheelScrollingEnabled</code> 594 * method returns false, no scrolling occurs. 595 * 596 * @see javax.swing.JScrollPane#isWheelScrollingEnabled 597 * @see #createMouseWheelListener 598 * @see java.awt.event.MouseWheelListener 599 * @see java.awt.event.MouseWheelEvent 600 * @since 1.4 601 */ 602 protected class MouseWheelHandler implements MouseWheelListener { 603 604 // NOTE: This class exists only for backward compatibility. All 605 // its functionality has been moved into Handler. If you need to add 606 // new functionality add it to the Handler, but make sure this 607 // class calls into the Handler. 608 609 /** 610 * Called when the mouse wheel is rotated while over a 611 * JScrollPane. 612 * 613 * @param e MouseWheelEvent to be handled | 516 517 518 /** 519 * Horizontal scrollbar listener. 520 */ 521 public class HSBChangeListener implements ChangeListener 522 { 523 524 // NOTE: This class exists only for backward compatibility. All 525 // its functionality has been moved into Handler. If you need to add 526 // new functionality add it to the Handler, but make sure this 527 // class calls into the Handler. 528 529 public void stateChanged(ChangeEvent e) 530 { 531 getHandler().stateChanged(e); 532 } 533 } 534 535 /** 536 * Returns a {@code PropertyChangeListener} that will be installed 537 * on the horizontal {@code JScrollBar}. 538 */ 539 private PropertyChangeListener createHSBPropertyChangeListener() { 540 return getHandler(); 541 } 542 543 /** 544 * Returns an instance of horizontal scroll bar {@code ChangeListener}. 545 * 546 * @return an instance of horizontal scroll bar {@code ChangeListener} 547 */ 548 protected ChangeListener createHSBChangeListener() { 549 return getHandler(); 550 } 551 552 553 /** 554 * Vertical scrollbar listener. 555 */ 556 public class VSBChangeListener implements ChangeListener 557 { 558 559 // NOTE: This class exists only for backward compatibility. All 560 // its functionality has been moved into Handler. If you need to add 561 // new functionality add it to the Handler, but make sure this 562 // class calls into the Handler. 563 564 public void stateChanged(ChangeEvent e) 565 { 566 getHandler().stateChanged(e); 567 } 568 } 569 570 571 /** 572 * Returns a {@code PropertyChangeListener} that will be installed 573 * on the vertical {@code JScrollBar}. 574 */ 575 private PropertyChangeListener createVSBPropertyChangeListener() { 576 return getHandler(); 577 } 578 579 /** 580 * Returns an instance of vertical scroll bar {@code ChangeListener}. 581 * 582 * @return an instance of vertical scroll bar {@code ChangeListener} 583 */ 584 protected ChangeListener createVSBChangeListener() { 585 return getHandler(); 586 } 587 588 /** 589 * MouseWheelHandler is an inner class which implements the 590 * MouseWheelListener interface. MouseWheelHandler responds to 591 * MouseWheelEvents by scrolling the JScrollPane appropriately. 592 * If the scroll pane's 593 * {@code isWheelScrollingEnabled} 594 * method returns false, no scrolling occurs. 595 * 596 * @see javax.swing.JScrollPane#isWheelScrollingEnabled 597 * @see #createMouseWheelListener 598 * @see java.awt.event.MouseWheelListener 599 * @see java.awt.event.MouseWheelEvent 600 * @since 1.4 601 */ 602 protected class MouseWheelHandler implements MouseWheelListener { 603 604 // NOTE: This class exists only for backward compatibility. All 605 // its functionality has been moved into Handler. If you need to add 606 // new functionality add it to the Handler, but make sure this 607 // class calls into the Handler. 608 609 /** 610 * Called when the mouse wheel is rotated while over a 611 * JScrollPane. 612 * 613 * @param e MouseWheelEvent to be handled |