jsky.util.gui
Class BasicRangeSliderUI.RangeSliderTrackListener
java.lang.Object
javax.swing.event.MouseInputAdapter
javax.swing.plaf.basic.BasicSliderUI.TrackListener
jsky.util.gui.BasicRangeSliderUI.RangeSliderTrackListener
- All Implemented Interfaces:
- java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener, javax.swing.event.MouseInputListener
- Enclosing class:
- BasicRangeSliderUI
public class BasicRangeSliderUI.RangeSliderTrackListener
- extends javax.swing.plaf.basic.BasicSliderUI.TrackListener
Fields inherited from class javax.swing.plaf.basic.BasicSliderUI.TrackListener |
currentMouseX, currentMouseY, offset |
Method Summary |
void |
mouseDragged(java.awt.event.MouseEvent e)
Set the models value to the position of the top/left
of the thumb relative to the origin of the track. |
void |
mousePressed(java.awt.event.MouseEvent e)
If the mouse is pressed above the "thumb" component
then reduce the scrollbars value by one page ("page up"),
otherwise increase it by one page. |
void |
mouseReleased(java.awt.event.MouseEvent e)
|
boolean |
shouldScroll(int direction,
java.awt.Rectangle r)
|
Methods inherited from class javax.swing.plaf.basic.BasicSliderUI.TrackListener |
mouseMoved, shouldScroll |
Methods inherited from class javax.swing.event.MouseInputAdapter |
mouseClicked, mouseEntered, mouseExited |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicRangeSliderUI.RangeSliderTrackListener
public BasicRangeSliderUI.RangeSliderTrackListener()
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Specified by:
mouseReleased
in interface java.awt.event.MouseListener
- Overrides:
mouseReleased
in class javax.swing.plaf.basic.BasicSliderUI.TrackListener
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- If the mouse is pressed above the "thumb" component
then reduce the scrollbars value by one page ("page up"),
otherwise increase it by one page. If there is no
thumb then page up if the mouse is in the upper half
of the track.
- Specified by:
mousePressed
in interface java.awt.event.MouseListener
- Overrides:
mousePressed
in class javax.swing.plaf.basic.BasicSliderUI.TrackListener
shouldScroll
public boolean shouldScroll(int direction,
java.awt.Rectangle r)
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
- Set the models value to the position of the top/left
of the thumb relative to the origin of the track.
- Specified by:
mouseDragged
in interface java.awt.event.MouseMotionListener
- Overrides:
mouseDragged
in class javax.swing.plaf.basic.BasicSliderUI.TrackListener