Quaqua 8.0 2011-10-02

ch.randelshofer.quaqua
Class QuaquaScrollBarUI.QuaquaTrackListener

java.lang.Object
  extended by java.awt.event.MouseAdapter
      extended by ch.randelshofer.quaqua.QuaquaScrollBarUI.QuaquaTrackListener
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener
Enclosing class:
QuaquaScrollBarUI

protected class QuaquaScrollBarUI.QuaquaTrackListener
extends java.awt.event.MouseAdapter


Field Summary
protected  int direction
           
 
Constructor Summary
protected QuaquaScrollBarUI.QuaquaTrackListener()
           
 
Method Summary
 void mouseDragged(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 mouseMoved(java.awt.event.MouseEvent e)
           
 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)
           
 
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseWheelMoved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

direction

protected transient int direction
Constructor Detail

QuaquaScrollBarUI.QuaquaTrackListener

protected QuaquaScrollBarUI.QuaquaTrackListener()
Method Detail

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

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

mouseDragged

public void mouseDragged(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 in interface java.awt.event.MouseMotionListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

Copyright 2003-2007 (c) Werner Randelshofer.
All rights reserved.