javax.swing.plaf.basic
Class BasicScrollBarUI.TrackListener

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

protected class BasicScrollBarUI.TrackListener
extends MouseAdapter sample code for java.awt.event.MouseAdapter definition code for java.awt.event.MouseAdapter
implements MouseMotionListener sample code for java.awt.event.MouseMotionListener definition code for java.awt.event.MouseMotionListener

Track mouse drags.


Field Summary
protected  int currentMouseX sample code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.currentMouseX definition code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.currentMouseX
           
protected  int currentMouseY sample code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.currentMouseY definition code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.currentMouseY
           
protected  int offset sample code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.offset definition code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.offset
           
 
Constructor Summary
protected BasicScrollBarUI.TrackListener sample code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.BasicScrollBarUI.TrackListener() definition code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.BasicScrollBarUI.TrackListener() ()
           
 
Method Summary
 void mouseDragged sample code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.mouseDragged(java.awt.event.MouseEvent) definition code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.mouseDragged(java.awt.event.MouseEvent) (MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
          Set the models value to the position of the thumb's top of Vertical scrollbar, or the left/right of Horizontal scrollbar in left-to-right/right-to-left scrollbar relative to the origin of the track.
 void mouseExited sample code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.mouseExited(java.awt.event.MouseEvent) definition code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.mouseExited(java.awt.event.MouseEvent) (MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
          Invoked when the mouse exits the scrollbar.
 void mouseMoved sample code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.mouseMoved(java.awt.event.MouseEvent) definition code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.mouseMoved(java.awt.event.MouseEvent) (MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
          Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.
 void mousePressed sample code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.mousePressed(java.awt.event.MouseEvent) definition code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.mousePressed(java.awt.event.MouseEvent) (MouseEvent sample code for java.awt.event.MouseEvent definition code for 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 sample code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.mouseReleased(java.awt.event.MouseEvent) definition code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.mouseReleased(java.awt.event.MouseEvent) (MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
          Invoked when a mouse button has been released on a component.
 
Methods inherited from class java.awt.event.MouseAdapter sample code for java.awt.event.MouseAdapter definition code for java.awt.event.MouseAdapter
mouseClicked sample code for java.awt.event.MouseAdapter.mouseClicked(java.awt.event.MouseEvent) definition code for java.awt.event.MouseAdapter.mouseClicked(java.awt.event.MouseEvent) , mouseEntered sample code for java.awt.event.MouseAdapter.mouseEntered(java.awt.event.MouseEvent) definition code for java.awt.event.MouseAdapter.mouseEntered(java.awt.event.MouseEvent)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

offset sample code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.offset

protected transient int offset

currentMouseX sample code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.currentMouseX

protected transient int currentMouseX

currentMouseY sample code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.currentMouseY

protected transient int currentMouseY
Constructor Detail

BasicScrollBarUI.TrackListener sample code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener() definition code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener()

protected BasicScrollBarUI.TrackListener()
Method Detail

mouseReleased sample code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.mouseReleased(java.awt.event.MouseEvent) definition code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.mouseReleased(java.awt.event.MouseEvent)

public void mouseReleased(MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
Description copied from class: MouseAdapter sample code for java.awt.event.MouseAdapter.mouseReleased(java.awt.event.MouseEvent) definition code for java.awt.event.MouseAdapter.mouseReleased(java.awt.event.MouseEvent)
Invoked when a mouse button has been released on a component.

Specified by:
mouseReleased sample code for java.awt.event.MouseListener.mouseReleased(java.awt.event.MouseEvent) definition code for java.awt.event.MouseListener.mouseReleased(java.awt.event.MouseEvent) in interface MouseListener sample code for java.awt.event.MouseListener definition code for java.awt.event.MouseListener
Overrides:
mouseReleased sample code for java.awt.event.MouseAdapter.mouseReleased(java.awt.event.MouseEvent) definition code for java.awt.event.MouseAdapter.mouseReleased(java.awt.event.MouseEvent) in class MouseAdapter sample code for java.awt.event.MouseAdapter definition code for java.awt.event.MouseAdapter

mousePressed sample code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.mousePressed(java.awt.event.MouseEvent) definition code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.mousePressed(java.awt.event.MouseEvent)

public void mousePressed(MouseEvent sample code for java.awt.event.MouseEvent definition code for 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 sample code for java.awt.event.MouseListener.mousePressed(java.awt.event.MouseEvent) definition code for java.awt.event.MouseListener.mousePressed(java.awt.event.MouseEvent) in interface MouseListener sample code for java.awt.event.MouseListener definition code for java.awt.event.MouseListener
Overrides:
mousePressed sample code for java.awt.event.MouseAdapter.mousePressed(java.awt.event.MouseEvent) definition code for java.awt.event.MouseAdapter.mousePressed(java.awt.event.MouseEvent) in class MouseAdapter sample code for java.awt.event.MouseAdapter definition code for java.awt.event.MouseAdapter

mouseDragged sample code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.mouseDragged(java.awt.event.MouseEvent) definition code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.mouseDragged(java.awt.event.MouseEvent)

public void mouseDragged(MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
Set the models value to the position of the thumb's top of Vertical scrollbar, or the left/right of Horizontal scrollbar in left-to-right/right-to-left scrollbar relative to the origin of the track.

Specified by:
mouseDragged sample code for java.awt.event.MouseMotionListener.mouseDragged(java.awt.event.MouseEvent) definition code for java.awt.event.MouseMotionListener.mouseDragged(java.awt.event.MouseEvent) in interface MouseMotionListener sample code for java.awt.event.MouseMotionListener definition code for java.awt.event.MouseMotionListener

mouseMoved sample code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.mouseMoved(java.awt.event.MouseEvent) definition code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.mouseMoved(java.awt.event.MouseEvent)

public void mouseMoved(MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
Description copied from interface: MouseMotionListener sample code for java.awt.event.MouseMotionListener.mouseMoved(java.awt.event.MouseEvent) definition code for java.awt.event.MouseMotionListener.mouseMoved(java.awt.event.MouseEvent)
Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.

Specified by:
mouseMoved sample code for java.awt.event.MouseMotionListener.mouseMoved(java.awt.event.MouseEvent) definition code for java.awt.event.MouseMotionListener.mouseMoved(java.awt.event.MouseEvent) in interface MouseMotionListener sample code for java.awt.event.MouseMotionListener definition code for java.awt.event.MouseMotionListener

mouseExited sample code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.mouseExited(java.awt.event.MouseEvent) definition code for javax.swing.plaf.basic.BasicScrollBarUI.TrackListener.mouseExited(java.awt.event.MouseEvent)

public void mouseExited(MouseEvent sample code for java.awt.event.MouseEvent definition code for java.awt.event.MouseEvent  e)
Invoked when the mouse exits the scrollbar.

Specified by:
mouseExited sample code for java.awt.event.MouseListener.mouseExited(java.awt.event.MouseEvent) definition code for java.awt.event.MouseListener.mouseExited(java.awt.event.MouseEvent) in interface MouseListener sample code for java.awt.event.MouseListener definition code for java.awt.event.MouseListener
Overrides:
mouseExited sample code for java.awt.event.MouseAdapter.mouseExited(java.awt.event.MouseEvent) definition code for java.awt.event.MouseAdapter.mouseExited(java.awt.event.MouseEvent) in class MouseAdapter sample code for java.awt.event.MouseAdapter definition code for java.awt.event.MouseAdapter
Parameters:
e - MouseEvent further describing the event
Since:
1.5