public final class MouseClickInfo extends Object
Information about a mouse button to click.
Examples:
Specify that the right button should be clicked once:
// import static org.assertj.swing.fixture.MouseClickInfo.*; MouseClickInfo i = rightButton();
Specify that the left button should be clicked two times (similar to double-click):
// import static org.assertj.swing.fixture.MouseClickInfo.*; MouseClickInfo i = leftButton().times(2);
Modifier and Type | Method and Description |
---|---|
MouseButton |
button() |
static MouseClickInfo |
button(MouseButton button)
Specifies that the given button should be clicked once.
|
static MouseClickInfo |
leftButton()
Specifies that the left button should be clicked once.
|
static MouseClickInfo |
middleButton()
Specifies that the middle button should be clicked once.
|
static MouseClickInfo |
rightButton()
Specifies that the right button should be clicked once.
|
int |
times() |
MouseClickInfo |
times(int newTimes)
Specifies how many times the mouse button should be clicked.
|
String |
toString() |
@Nonnull public static MouseClickInfo leftButton()
@Nonnull public static MouseClickInfo middleButton()
@Nonnull public static MouseClickInfo rightButton()
@Nonnull public static MouseClickInfo button(@Nonnull MouseButton button)
button
- the mouse button to click.NullPointerException
- if button
is null
.@Nonnull public MouseButton button()
public int times()
mouse button
should be clicked.public MouseClickInfo times(int newTimes)
newTimes
- the specified number of times to click the mouse button.Copyright © 2014–2019 AssertJ. All rights reserved.