javax.swing.plaf.basic
public class: BasicSliderUI.ScrollListener [javadoc |
source]
java.lang.Object
javax.swing.plaf.basic.BasicSliderUI$ScrollListener
All Implemented Interfaces:
ActionListener
Scroll-event listener.
This class should be treated as a "protected" inner class.
Instantiate it only within subclasses of
.
| Field Summary |
|---|
| int | direction | |
| boolean | useBlockIncrement | |
| Methods from java.lang.Object: |
|---|
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from javax.swing.plaf.basic.BasicSliderUI$ScrollListener Detail: |
public void actionPerformed(ActionEvent e) {
if (useBlockIncrement) {
scrollByBlock(direction);
}
else {
scrollByUnit(direction);
}
if (!trackListener.shouldScroll(direction)) {
((Timer)e.getSource()).stop();
}
}
|
public void setDirection(int direction) {
this.direction = direction;
}
|
public void setScrollByBlock(boolean block) {
this.useBlockIncrement = block;
}
|