Package FlaNium.WinAPI.actions
Class ElementMouseActions
- java.lang.Object
-
- FlaNium.WinAPI.actions.ElementMouseActions
-
public class ElementMouseActions extends Object
-
-
Constructor Summary
Constructors Constructor Description ElementMouseActions(DesktopElement desktopElement)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddragAndDrop(BasePoint basePoint, int x, int y, int dx, int dy)Drags and drops the mouse from the starting point (Base point of element bounding rectangle + x, y coordinates) with the given distance.voidmouseClick(BasePoint basePoint, int x, int y)Click the mouse on the point (Base point of element bounding rectangle + x, y coordinates).voidmouseDoubleClick(BasePoint basePoint, int x, int y)Double click the mouse on the point (Base point of element bounding rectangle + x, y coordinates).voidmouseMove(BasePoint basePoint, int x, int y)Move the mouse to the point (Base point of element bounding rectangle + x, y coordinates).voidmouseRightClick(BasePoint basePoint, int x, int y)Right click the mouse on the point (Base point of element bounding rectangle + x, y coordinates).voidsmoothDragAndDrop(BasePoint basePoint, int x, int y, int dx, int dy, int duration)Drags and drops the mouse from the starting point (Base point of element bounding rectangle + x, y coordinates) with the given distance and within the specified time.
-
-
-
Constructor Detail
-
ElementMouseActions
public ElementMouseActions(DesktopElement desktopElement)
-
-
Method Detail
-
dragAndDrop
public void dragAndDrop(BasePoint basePoint, int x, int y, int dx, int dy)
Drags and drops the mouse from the starting point (Base point of element bounding rectangle + x, y coordinates) with the given distance.- Parameters:
basePoint-BasePointof element bounding rectangle.x- X Coordinate relative to base point of element bounding rectangle.y- Y Coordinate relative to base point of element bounding rectangle.dx- The x distance to drag and drop, + for right, - for left.dy- The y distance to drag and drop, + for down, - for up.
-
smoothDragAndDrop
public void smoothDragAndDrop(BasePoint basePoint, int x, int y, int dx, int dy, int duration)
Drags and drops the mouse from the starting point (Base point of element bounding rectangle + x, y coordinates) with the given distance and within the specified time.- Parameters:
basePoint-BasePointof element bounding rectangle.x- X Coordinate relative to base point of element bounding rectangle.y- Y Coordinate relative to base point of element bounding rectangle.dx- The x distance to drag and drop, + for right, - for left.dy- The y distance to drag and drop, + for down, - for up.duration- Execution time in milliseconds.
-
mouseMove
public void mouseMove(BasePoint basePoint, int x, int y)
Move the mouse to the point (Base point of element bounding rectangle + x, y coordinates).- Parameters:
basePoint-BasePointof element bounding rectangle.x- X Coordinate relative to base point of element bounding rectangle.y- Y Coordinate relative to base point of element bounding rectangle.
-
mouseClick
public void mouseClick(BasePoint basePoint, int x, int y)
Click the mouse on the point (Base point of element bounding rectangle + x, y coordinates).- Parameters:
basePoint-BasePointof element bounding rectangle.x- X Coordinate relative to base point of element bounding rectangle.y- Y Coordinate relative to base point of element bounding rectangle.
-
mouseRightClick
public void mouseRightClick(BasePoint basePoint, int x, int y)
Right click the mouse on the point (Base point of element bounding rectangle + x, y coordinates).- Parameters:
basePoint-BasePointof element bounding rectangle.x- X Coordinate relative to base point of element bounding rectangle.y- Y Coordinate relative to base point of element bounding rectangle.
-
mouseDoubleClick
public void mouseDoubleClick(BasePoint basePoint, int x, int y)
Double click the mouse on the point (Base point of element bounding rectangle + x, y coordinates).- Parameters:
basePoint-BasePointof element bounding rectangle.x- X Coordinate relative to base point of element bounding rectangle.y- Y Coordinate relative to base point of element bounding rectangle.
-
-