Package org.fest.swing.driver
Class JSplitPaneDriver
java.lang.Object
org.fest.swing.driver.ComponentDriver
org.fest.swing.driver.ContainerDriver
org.fest.swing.driver.JComponentDriver
org.fest.swing.driver.JSplitPaneDriver
Understands functional testing of
JSplitPane
s:
- user input simulation
- state verification
- property value query
org.fest.swing.fixture
in your tests.-
Field Summary
Fields inherited from class org.fest.swing.driver.ComponentDriver
robot
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
moveDividerTo
(JSplitPane splitPane, int location) Sets the divider position to an absolute position.private void
simulateMovingDivider
(JSplitPane split, int location) private void
simulateMovingDivider
(JSplitPane splitPane, GenericRange<Point> range) private void
simulateMovingDividerHorizontally
(JSplitPane splitPane, int location) private void
simulateMovingDividerVertically
(JSplitPane splitPane, int location) private static GenericRange<Point>
validateAndFindWhereToMoveDividerHorizontally
(JSplitPane splitPane, int location) private static GenericRange<Point>
validateAndFindWhereToMoveDividerVertically
(JSplitPane splitPane, int location) private static GenericRange<Point>
whereToMoveDividerHorizontally
(JSplitPane splitPane, int location) private static GenericRange<Point>
whereToMoveDividerVertically
(JSplitPane splitPane, int location) Methods inherited from class org.fest.swing.driver.JComponentDriver
clientProperty, invokeAction, isVisible, isVisible, requireToolTip, requireToolTip, scrollToVisible
Methods inherited from class org.fest.swing.driver.ContainerDriver
move, resize, resizeHeight, resizeWidth
Methods inherited from class org.fest.swing.driver.ComponentDriver
assertIsEnabledAndShowing, click, click, click, click, click, doubleClick, drag, dragOver, drop, focus, focusAndWaitForFocusGain, invokePopupMenu, invokePopupMenu, moveMouseIgnoringAnyError, moveMouseIgnoringAnyError, performAccessibleActionOf, pressAndReleaseKey, pressAndReleaseKey, pressAndReleaseKeys, pressKey, propertyName, releaseKey, requireDisabled, requireEnabled, requireEnabled, requireFocused, requireNotVisible, requireSize, requireVisible, rightClick, settings, waitForShowing
-
Constructor Details
-
JSplitPaneDriver
Creates a newJSplitPaneDriver
.- Parameters:
robot
- the robot to use to simulate user input.
-
-
Method Details
-
moveDividerTo
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 targetJSplitPane
.location
- the location to move the divider to.- Throws:
IllegalStateException
- if theJSplitPane
is disabled.IllegalStateException
- if theJSplitPane
is not showing on the screen.
-
simulateMovingDivider
-
simulateMovingDividerVertically
-
validateAndFindWhereToMoveDividerVertically
@RunsInEDT private static GenericRange<Point> validateAndFindWhereToMoveDividerVertically(JSplitPane splitPane, int location) -
whereToMoveDividerVertically
@RunsInCurrentThread private static GenericRange<Point> whereToMoveDividerVertically(JSplitPane splitPane, int location) -
simulateMovingDividerHorizontally
-
validateAndFindWhereToMoveDividerHorizontally
@RunsInEDT private static GenericRange<Point> validateAndFindWhereToMoveDividerHorizontally(JSplitPane splitPane, int location) -
whereToMoveDividerHorizontally
@RunsInCurrentThread private static GenericRange<Point> whereToMoveDividerHorizontally(JSplitPane splitPane, int location) -
simulateMovingDivider
-