public class

BasicSliderUI.TrackListener

extends MouseInputAdapter
java.lang.Object
   ↳ java.awt.event.MouseAdapter
     ↳ javax.swing.event.MouseInputAdapter
       ↳ javax.swing.plaf.basic.BasicSliderUI.TrackListener

Class Overview

Track mouse movements. This class should be treated as a "protected" inner class. Instantiate it only within subclasses of .

Summary

Fields
protected int currentMouseX
protected int currentMouseY
protected int offset
Public Constructors
BasicSliderUI.TrackListener()
Public Methods
void mouseDragged(MouseEvent e)
Set the models value to the position of the top/left of the thumb relative to the origin of the track.
void mouseMoved(MouseEvent e)
Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.
void mousePressed(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(MouseEvent e)
Invoked when a mouse button has been released on a component.
boolean shouldScroll(int direction)
[Expand]
Inherited Methods
From class java.awt.event.MouseAdapter
From class java.lang.Object
From interface java.awt.event.MouseListener
From interface java.awt.event.MouseMotionListener
From interface java.awt.event.MouseWheelListener

Fields

protected int currentMouseX

protected int currentMouseY

protected int offset

Public Constructors

public BasicSliderUI.TrackListener ()

Public Methods

public void mouseDragged (MouseEvent e)

Set the models value to the position of the top/left of the thumb relative to the origin of the track.

public void mouseMoved (MouseEvent e)

Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.

public void mousePressed (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.

public void mouseReleased (MouseEvent e)

Invoked when a mouse button has been released on a component.

public boolean shouldScroll (int direction)