Class JSplitPaneDriver


public class JSplitPaneDriver extends JComponentDriver
Understands functional testing of JSplitPanes:
  • user input simulation
  • state verification
  • property value query
This class is intended for internal use only. Please use the classes in the package org.fest.swing.fixture in your tests.
  • Constructor Details

    • JSplitPaneDriver

      public JSplitPaneDriver(Robot robot)
      Creates a new JSplitPaneDriver.
      Parameters:
      robot - the robot to use to simulate user input.
  • Method Details

    • moveDividerTo

      @RunsInEDT public void moveDividerTo(JSplitPane splitPane, int location)
      Sets the divider position to an absolute position.

      Since 1.2, this method respects the minimum and maximum values of the left and right components inside the given JSplitPane.

      Parameters:
      splitPane - the target JSplitPane.
      location - the location to move the divider to.
      Throws:
      IllegalStateException - if the JSplitPane is disabled.
      IllegalStateException - if the JSplitPane is not showing on the screen.
    • simulateMovingDivider

      @RunsInEDT private void simulateMovingDivider(JSplitPane split, int location)
    • simulateMovingDividerVertically

      @RunsInEDT private void simulateMovingDividerVertically(JSplitPane splitPane, int location)
    • validateAndFindWhereToMoveDividerVertically

      @RunsInEDT private static GenericRange<Point> validateAndFindWhereToMoveDividerVertically(JSplitPane splitPane, int location)
    • whereToMoveDividerVertically

      @RunsInCurrentThread private static GenericRange<Point> whereToMoveDividerVertically(JSplitPane splitPane, int location)
    • simulateMovingDividerHorizontally

      private void simulateMovingDividerHorizontally(JSplitPane splitPane, int location)
    • validateAndFindWhereToMoveDividerHorizontally

      @RunsInEDT private static GenericRange<Point> validateAndFindWhereToMoveDividerHorizontally(JSplitPane splitPane, int location)
    • whereToMoveDividerHorizontally

      @RunsInCurrentThread private static GenericRange<Point> whereToMoveDividerHorizontally(JSplitPane splitPane, int location)
    • simulateMovingDivider

      @RunsInEDT private void simulateMovingDivider(JSplitPane splitPane, GenericRange<Point> range)