javax.swing.plaf.basic
Class BasicScrollBarUI.TrackListener

java.lang.Object
  extended by java.awt.event.MouseAdapter
      extended by javax.swing.plaf.basic.BasicScrollBarUI.TrackListener
All Implemented Interfaces:
MouseListener, MouseMotionListener, EventListener
Enclosing class:
BasicScrollBarUI

protected class BasicScrollBarUI.TrackListener
extends MouseAdapter
implements MouseMotionListener

Helper class that listens for movement on the track.


Field Summary
protected  int currentMouseX
          The current X coordinate of the mouse.
protected  int currentMouseY
          The current Y coordinate of the mouse.
protected  int offset
          The offset between the current mouse cursor and the current value of the scrollbar.
 
Constructor Summary
protected BasicScrollBarUI.TrackListener()
           
 
Method Summary
 void mouseDragged(MouseEvent e)
          This method is called when the mouse is being dragged.
 void mouseMoved(MouseEvent e)
          This method is called when the mouse is moved.
 void mousePressed(MouseEvent e)
          This method is called when the mouse is pressed.
 void mouseReleased(MouseEvent e)
          This method is called when the mouse is released.
 
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.

Constructor Detail

BasicScrollBarUI.TrackListener

protected BasicScrollBarUI.TrackListener()
Method Detail

mouseDragged

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

Specified by:
mouseDragged in interface MouseMotionListener
Parameters:
e - The MouseEvent given.

mouseMoved

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

Specified by:
mouseMoved in interface MouseMotionListener
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.

Specified by:
mousePressed in interface MouseListener
Overrides:
mousePressed in class MouseAdapter
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

Specified by:
mouseReleased in interface MouseListener
Overrides:
mouseReleased in class MouseAdapter
Parameters:
e - The MouseEvent given.