@InternalApi public class JToolBarDriver extends JComponentDriver
Supports functional testing of JToolBar
s.
Note: This class is intended for internal use only. Please use the classes in the package
org.assertj.swing.fixture
in your tests.
robot
Constructor and Description |
---|
JToolBarDriver(Robot robot)
Creates a new
JToolBarDriver . |
Modifier and Type | Method and Description |
---|---|
void |
floatTo(JToolBar toolBar,
int x,
int y)
Drags the
JToolBar to the given location, causing it to float. |
boolean |
isFloating(JToolBar toolBar)
Indicates whether the given
JToolBar is floating or not. |
void |
makeFloat(JToolBar toolBar)
Makes the given
JToolBar float. |
void |
unfloat(JToolBar toolBar)
Closes a floating
JToolBar , making it go back to its original container in its last known location. |
void |
unfloat(JToolBar toolBar,
String constraint)
Drop the
JToolBar to the requested constraint position. |
clientProperty, invokeAction, isVisible, isVisible, requireToolTip, requireToolTip, scrollToVisible
doResizeHeight, doResizeWidth, isResizable, move, resize
backgroundOf, checkClickAllowed, checkInEdtEnabledAndShowing, checkInEdtShowing, click, click, click, click, click, doubleClick, drag, dragOver, drop, drop, focus, focusAndWaitForFocusGain, fontOf, foregroundOf, invokePopupMenu, invokePopupMenu, moveMouseIgnoringAnyError, moveMouseIgnoringAnyError, performAccessibleActionOf, pressAndReleaseKey, pressAndReleaseKey, pressAndReleaseKeys, pressKey, pressKeyWhileRunning, propertyName, releaseKey, requireDisabled, requireEnabled, requireEnabled, requireFocused, requireNotVisible, requireSize, requireVisible, rightClick, settings, waitForShowing
public JToolBarDriver(@Nonnull Robot robot)
JToolBarDriver
.robot
- the robot to use to simulate user input.@RunsInEDT public boolean isFloating(@Nonnull JToolBar toolBar)
JToolBar
is floating or not.toolBar
- the target JToolBar
.true
if the JToolBar
is floating, false
otherwise.public void makeFloat(@Nonnull JToolBar toolBar)
JToolBar
float.toolBar
- the target JToolBar
.IllegalStateException
- if the JToolBar
is disabled.IllegalStateException
- if the JToolBar
is not showing on the screen.IllegalStateException
- if the JToolBar
is not floatable.ActionFailedException
- if the JToolBar
cannot be dragged.@RunsInEDT public void floatTo(@Nonnull JToolBar toolBar, int x, int y)
JToolBar
to the given location, causing it to float.toolBar
- the target JToolBar
.x
- the horizontal coordinate of the location to drag the JToolBar
to.y
- the vertical coordinate of the location to drag the JToolBar
to.IllegalStateException
- if the JToolBar
is disabled.IllegalStateException
- if the JToolBar
is not showing on the screen.IllegalStateException
- if the JToolBar
is not floatable.ActionFailedException
- if the JToolBar
cannot be dragged.@RunsInEDT public void unfloat(@Nonnull JToolBar toolBar, @Nonnull String constraint)
JToolBar
to the requested constraint position. The constraint position must be one of the
constants BorderLayout.NORTH NORTH
, BorderLayout.EAST EAST
, BorderLayout.SOUTH SOUTH
, or
BorderLayout.WEST WEST
.toolBar
- the target JToolBar
.constraint
- the constraint position.IllegalStateException
- if the JToolBar
is disabled.IllegalStateException
- if the JToolBar
is not showing on the screen.IllegalArgumentException
- if the constraint has an invalid value.ActionFailedException
- if the dock container cannot be found.@RunsInEDT public void unfloat(@Nonnull JToolBar toolBar)
JToolBar
, making it go back to its original container in its last known location.toolBar
- the target JToolBar
.IllegalStateException
- if the JToolBar
is disabled.IllegalStateException
- if the JToolBar
is not showing on the screen.Copyright © 2014–2019 AssertJ. All rights reserved.