org.fest.swing.driver
Class JScrollBarLocation

java.lang.Object
  extended by org.fest.swing.driver.JScrollBarLocation

public final class JScrollBarLocation
extends Object

Understands a location in a JScrollBar.

Author:
Yvonne Wang, Alex Ruiz

Constructor Summary
JScrollBarLocation()
           
 
Method Summary
 Point blockLocationToScrollDown(JScrollBar scrollBar)
          Returns the location where to move the mouse pointer to scroll one block down (or left.)
 Point blockLocationToScrollUp(JScrollBar scrollBar)
          Returns the location where to move the mouse pointer to scroll one block up (or right.)
 Point thumbLocation(JScrollBar scrollBar, int position)
          Returns the location where to move the mouse pointer to scroll to the given position.
 Point unitLocationToScrollDown(JScrollBar scrollBar)
          Returns the location where to move the mouse pointer to scroll one unit down (or left.)
 Point unitLocationToScrollUp(JScrollBar scrollBar)
          Returns the location where to move the mouse pointer to scroll one unit up (or right.)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JScrollBarLocation

public JScrollBarLocation()
Method Detail

thumbLocation

@RunsInCurrentThread
public Point thumbLocation(JScrollBar scrollBar,
                                               int position)
Returns the location where to move the mouse pointer to scroll to the given position.

Note: This method is not guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for calling this method from the EDT.

Parameters:
scrollBar - the target JScrollBar.
position - the position to scroll to.
Returns:
the location where to move the mouse pointer to scroll to the given position.

blockLocationToScrollUp

@RunsInCurrentThread
public Point blockLocationToScrollUp(JScrollBar scrollBar)
Returns the location where to move the mouse pointer to scroll one block up (or right.)

Note: This method is not guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for calling this method from the EDT.

Parameters:
scrollBar - the target JScrollBar.
Returns:
the location where to move the mouse pointer to scroll one block up (or right.)

blockLocationToScrollDown

@RunsInCurrentThread
public Point blockLocationToScrollDown(JScrollBar scrollBar)
Returns the location where to move the mouse pointer to scroll one block down (or left.)

Note: This method is not guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for calling this method from the EDT.

Parameters:
scrollBar - the target JScrollBar.
Returns:
the location where to move the mouse pointer to scroll one block down (or left.)

unitLocationToScrollUp

@RunsInCurrentThread
public Point unitLocationToScrollUp(JScrollBar scrollBar)
Returns the location where to move the mouse pointer to scroll one unit up (or right.)

Note: This method is not guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for calling this method from the EDT.

Parameters:
scrollBar - the target JScrollBar.
Returns:
the location where to move the mouse pointer to scroll one unit up (or right.)

unitLocationToScrollDown

@RunsInCurrentThread
public Point unitLocationToScrollDown(JScrollBar scrollBar)
Returns the location where to move the mouse pointer to scroll one unit down (or left.)

Note: This method is not guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for calling this method from the EDT.

Parameters:
scrollBar - the target JScrollBar.
Returns:
the location where to move the mouse pointer to scroll one unit down (or left.)


Copyright © 2007-2011 FEST (Fixtures for Easy Software Testing). All Rights Reserved.