org.fest.swing.core
Class MouseClickInfo

java.lang.Object
  extended by org.fest.swing.core.MouseClickInfo

public final class MouseClickInfo
extends Object

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);
 

Author:
Alex Ruiz

Method Summary
 MouseButton button()
          Returns the button to click.
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()
          Returns how many times the mouse button should be clicked.
 MouseClickInfo times(int newTimes)
          Specifies how many times the mouse button should be clicked.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

leftButton

public static MouseClickInfo leftButton()
Specifies that the left button should be clicked once.

Returns:
the created click info.

middleButton

public static MouseClickInfo middleButton()
Specifies that the middle button should be clicked once.

Returns:
the created click info.

rightButton

public static MouseClickInfo rightButton()
Specifies that the right button should be clicked once.

Returns:
the created click info.

button

public static MouseClickInfo button(MouseButton button)
Specifies that the given button should be clicked once.

Parameters:
button - the mouse button to click.
Returns:
the created click info.
Throws:
NullPointerException - if button is null.

button

public MouseButton button()
Returns the button to click.

Returns:
the button to click.

times

public int times()
Returns how many times the mouse button should be clicked.

Returns:
how many times the mouse button should be clicked.

times

public MouseClickInfo times(int newTimes)
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

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2007-2011 FEST (Fixtures for Easy Software Testing). All Rights Reserved.