javax.swing.plaf.basic

Class BasicScrollBarUI.TrackListener

protected class BasicScrollBarUI.TrackListener extends MouseAdapter implements MouseMotionListener

Helper class that listens for movement on the track.
Field Summary
protected intcurrentMouseX
The current X coordinate of the mouse.
protected intcurrentMouseY
The current Y coordinate of the mouse.
protected intoffset
The offset between the current mouse cursor and the current value of the scrollbar.
Method Summary
voidmouseDragged(MouseEvent e)
This method is called when the mouse is being dragged.
voidmouseMoved(MouseEvent e)
This method is called when the mouse is moved.
voidmousePressed(MouseEvent e)
This method is called when the mouse is pressed.
voidmouseReleased(MouseEvent e)
This method is called when the mouse is released.

Field Detail

currentMouseX

protected int currentMouseX
The current X coordinate of the mouse.

currentMouseY

protected int currentMouseY
The current Y coordinate of the mouse.

offset

protected int offset
The offset between the current mouse cursor and the current value of the scrollbar.

Method Detail

mouseDragged

public void mouseDragged(MouseEvent e)
This method is called when the mouse is being dragged.

Parameters: e The MouseEvent given.

mouseMoved

public void mouseMoved(MouseEvent e)
This method is called when the mouse is moved.

Parameters: e The MouseEvent given.

mousePressed

public void mousePressed(MouseEvent e)
This method is called when the mouse is pressed. When it is pressed, the thumb should move in blocks towards the cursor.

Parameters: e The MouseEvent given.

mouseReleased

public void mouseReleased(MouseEvent e)
This method is called when the mouse is released. It should stop movement on the thumb

Parameters: e The MouseEvent given.