Class JScrollBarLocation

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

public final class JScrollBarLocation extends Object
Understands a location in a JScrollBar.
  • Field Details

  • Constructor Details

    • JScrollBarLocation

      public JScrollBarLocation()
  • Method Details

    • 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 executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in 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.
    • maximumMinusMinimum

      @RunsInCurrentThread private int maximumMinusMinimum(JScrollBar scrollBar)
    • 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 executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in 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 executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in the EDT.

      Parameters:
      scrollBar - the target JScrollBar.
      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

      @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 executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in 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 executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in the EDT.

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

      @RunsInCurrentThread private JScrollBarLocationStrategy locationStrategyFor(JScrollBar scrollBar)