Package org.fest.swing.driver
Class JScrollBarLocation
java.lang.Object
org.fest.swing.driver.JScrollBarLocation
Understands a location in a
JScrollBar
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final Map<Integer,
JScrollBarLocationStrategy> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate Point
blockLocation
(JScrollBar scrollBar, Point unitLocation, int offset) blockLocationToScrollDown
(JScrollBar scrollBar) Returns the location where to move the mouse pointer to scroll one block down (or left.)blockLocationToScrollUp
(JScrollBar scrollBar) Returns the location where to move the mouse pointer to scroll one block up (or right.)private JScrollBarLocationStrategy
locationStrategyFor
(JScrollBar scrollBar) private int
maximumMinusMinimum
(JScrollBar scrollBar) thumbLocation
(JScrollBar scrollBar, int position) Returns the location where to move the mouse pointer to scroll to the given position.unitLocationToScrollDown
(JScrollBar scrollBar) Returns the location where to move the mouse pointer to scroll one unit down (or left.)unitLocationToScrollUp
(JScrollBar scrollBar) Returns the location where to move the mouse pointer to scroll one unit up (or right.)
-
Field Details
-
BLOCK_OFFSET
private static final int BLOCK_OFFSET- See Also:
-
LOCATIONS
-
-
Constructor Details
-
JScrollBarLocation
public JScrollBarLocation()
-
-
Method Details
-
thumbLocation
Returns the location where to move the mouse pointer to scroll to the given position.Note: This method is not executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in the EDT.
- Parameters:
scrollBar
- the targetJScrollBar
.position
- the position to scroll to.- Returns:
- the location where to move the mouse pointer to scroll to the given position.
-
maximumMinusMinimum
-
blockLocationToScrollUp
Returns the location where to move the mouse pointer to scroll one block up (or right.)Note: This method is not executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in the EDT.
- Parameters:
scrollBar
- the targetJScrollBar
.- Returns:
- the location where to move the mouse pointer to scroll one block up (or right.)
-
blockLocationToScrollDown
Returns the location where to move the mouse pointer to scroll one block down (or left.)Note: This method is not executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in the EDT.
- Parameters:
scrollBar
- the targetJScrollBar
.- Returns:
- the location where to move the mouse pointer to scroll one block down (or left.)
-
blockLocation
@RunsInCurrentThread private Point blockLocation(JScrollBar scrollBar, Point unitLocation, int offset) -
unitLocationToScrollUp
Returns the location where to move the mouse pointer to scroll one unit up (or right.)Note: This method is not executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in the EDT.
- Parameters:
scrollBar
- the targetJScrollBar
.- Returns:
- the location where to move the mouse pointer to scroll one unit up (or right.)
-
unitLocationToScrollDown
Returns the location where to move the mouse pointer to scroll one unit down (or left.)Note: This method is not executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in the EDT.
- Parameters:
scrollBar
- the targetJScrollBar
.- Returns:
- the location where to move the mouse pointer to scroll one unit down (or left.)
-
locationStrategyFor
-