Package org.fest.swing.core
Class MouseClickInfo
java.lang.Object
org.fest.swing.core.MouseClickInfo
Understands information about clicking a mouse button.
Examples:
Specify that the right button should be clicked once:
// import static org.fest.swing.fixture.MouseClickInfo.*; MouseClickInfo i = rightButton();
Specify that the left button should be clicked two times (similar to double-click):
// import static org.fest.swing.fixture.MouseClickInfo.*; MouseClickInfo i = leftButton().times(2);
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbutton()
Returns the button to click.static MouseClickInfo
button
(MouseButton button) Specifies that the given button should be clicked once.static MouseClickInfo
Specifies that the left button should be clicked once.static MouseClickInfo
Specifies that the middle button should be clicked once.static MouseClickInfo
Specifies that the right button should be clicked once.int
times()
Returns how many times the
should be clicked.mouse button
times
(int newTimes) Specifies how many times the mouse button should be clicked.toString()
-
Field Details
-
button
-
times
private int times
-
-
Constructor Details
-
MouseClickInfo
-
-
Method Details
-
leftButton
Specifies that the left button should be clicked once.- Returns:
- the created click info.
-
middleButton
Specifies that the middle button should be clicked once.- Returns:
- the created click info.
-
rightButton
Specifies that the right button should be clicked once.- Returns:
- the created click info.
-
button
Specifies that the given button should be clicked once.- Parameters:
button
- the mouse button to click.- Returns:
- the created click info.
- Throws:
NullPointerException
- ifbutton
isnull
.
-
button
Returns the button to click.- Returns:
- the button to click.
-
times
public int times()Returns how many times the
should be clicked.mouse button
- Returns:
- how many times the
should be clicked.mouse button
-
times
Specifies how many times the mouse button should be clicked.- Parameters:
newTimes
- the specified number of times to click the mouse button.- Returns:
- this object.
-
toString
-