Creates an instance of MouseWheelListener, which is added to the
JScrollPane by installUI(). The returned MouseWheelListener is used
to handle mouse wheel-driven scrolling.
MouseWheelListener which implements wheel-driven scrolling See Also:BasicScrollPaneUI.installUI See Also: MouseWheelHandler since: 1.4
Creates an instance of PropertyChangeListener that's added to
the JScrollPane by installUI(). Subclasses can override this method
to return a custom PropertyChangeListener, e.g.
class MyScrollPaneUI extends BasicScrollPaneUI {
protected PropertyChangeListener createPropertyChangeListener() {
return new MyPropertyChangeListener();
}
public class MyPropertyChangeListener extends PropertyChangeListener {
public void propertyChange(PropertyChangeEvent e) {
if (e.getPropertyName().equals("viewport")) {
// do some extra work when the viewport changes
}
super.propertyChange(e);
}
}
}