public interface IMouseAPI
Modifier and Type | Interface and Description |
---|---|
static class |
IMouseAPI.CrossColor |
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_SPEED |
Modifier and Type | Method and Description |
---|---|
boolean |
click()
Clicks the left mouse button.
|
boolean |
click(boolean rightClick)
Clicks the left or right mouse button.
|
boolean |
click(Clickable clickable)
Moves the mouse and clicks on the given clickable entity.
|
boolean |
click(Clickable clickable,
boolean rightClick)
Moves the mouse and clicks on the given clickable entity.
|
boolean |
click(int x,
int y)
Moves the mouse and clicks at the given x,y coordinates.
|
boolean |
click(int x,
int y,
boolean rightClick)
Moves the mouse and clicks at the given x,y coordinates.
|
boolean |
click(java.awt.Point location)
Moves the mouse and clicks on the given location.
|
boolean |
click(java.awt.Point location,
boolean rightClick)
Moves the mouse and clicks on the given location.
|
boolean |
click(java.awt.Shape shape)
Moves the mouse and clicks on a random point on the given shape.
|
boolean |
click(java.awt.Shape shape,
boolean rightClick)
Moves the mouse and clicks on a random point on the given shape.
|
boolean |
drag(java.awt.Point end)
Drags the mouse from the current mouse location to the given location.
|
boolean |
drag(java.awt.Point start,
java.awt.Point end)
Drags the mouse to the start location if not already there and drags the mouse to the given end location.
|
boolean |
drag(java.awt.Point start,
java.awt.Point end,
int button)
Drags the mouse to the start location if not already there and drags the mouse to the given end location.
|
java.awt.Point |
getLastLocation()
Gets the last known mouse location before it went of screen.
|
java.awt.Point |
getLocation()
Gets the current mouse location.
|
IMouseAPI.CrossColor |
getMouseCrossColor() |
int |
getMouseCrossState() |
int |
getMouseCrossX() |
int |
getMouseCrossY() |
int |
getMoveSpeedTime()
Returns the base mouse movement speed in milliseconds.
|
int |
getX()
Gets the current x-coordinate of the mouse.
|
int |
getY()
Gets the current y-coordinate of the mouse.
|
boolean |
hold(int duration,
boolean rightClick)
Holds the left or right mouse button for a duration at the current mouse location.
|
boolean |
hold(java.awt.Point location,
int duration,
boolean rightClick)
Holds the left or right mouse button for a duration at the given location.
|
boolean |
isPresent() |
boolean |
isPressed() |
boolean |
isRightPressed() |
boolean |
move(Clickable clickable)
Moves the mouse onto the given clickable entity.
|
boolean |
move(java.awt.Point location)
Moves the mouse to the given location.
|
boolean |
moveOffScreen()
Simulates moving the mouse off screen.
|
boolean |
moveRandomly()
Moves the mouse randomly.
|
boolean |
moveRandomly(int maxDistance)
Moves the mouse randomly between the maximum distance.
|
boolean |
moveRandomly(int minDistance,
int maxDistance)
Moves the mouse randomly between the two distances.
|
boolean |
scroll(boolean up)
Scrolls the mouse wheel.
|
boolean |
scroll(boolean up,
int times)
Scrolls the mouse wheel.
|
static final int DEFAULT_SPEED
boolean isPressed()
boolean isRightPressed()
boolean isPresent()
boolean click()
boolean click(boolean rightClick)
rightClick
- true to use the right mouse button, false otherwiseboolean click(int x, int y)
x
- the x-coordinate to move toy
- the y-coordinate to move toboolean click(int x, int y, boolean rightClick)
x
- the x-coordinate to move toy
- the y-coordinate to move torightClick
- true to use the right mouse button, false otherwiseboolean click(java.awt.Shape shape)
shape
- the shape to click onboolean click(java.awt.Shape shape, boolean rightClick)
shape
- the shape to click onrightClick
- true to use the right mouse button, false otherwiseboolean click(java.awt.Point location)
location
- the locationboolean click(java.awt.Point location, boolean rightClick)
location
- the locationrightClick
- true to use the right mouse button, false otherwiseboolean click(Clickable clickable)
clickable
- the locationboolean click(Clickable clickable, boolean rightClick)
clickable
- the clickable entityrightClick
- true to use the right mouse button, false otherwiseboolean hold(int duration, boolean rightClick)
duration
- the duration to hold forrightClick
- true to use the right mouse button, false otherwiseboolean hold(java.awt.Point location, int duration, boolean rightClick)
location
- the location to hold the mouse button atduration
- the duration to hold forrightClick
- true to use the right mouse button, false otherwiseboolean move(java.awt.Point location)
location
- the locationboolean move(Clickable clickable)
clickable
- the entity to move the mouse toboolean moveOffScreen()
boolean moveRandomly()
boolean moveRandomly(int maxDistance)
maxDistance
- The maximum distance to move.boolean moveRandomly(int minDistance, int maxDistance)
minDistance
- The minimum distance to move.maxDistance
- The maximum distance to move.boolean scroll(boolean up)
up
- true to scroll up, false to scroll downboolean scroll(boolean up, int times)
up
- true to scroll up, false to scroll downtimes
- the number of times the scroll wheel should be rolledboolean drag(java.awt.Point end)
end
- the location to stop dragging atboolean drag(java.awt.Point start, java.awt.Point end)
start
- the location to start dragging atend
- the location to stop dragging atboolean drag(java.awt.Point start, java.awt.Point end, int button)
start
- the location to start dragging atend
- the location to stop dragging atbutton
- the mouse button to hold during the operation, see MouseEvent
, defaults to left-click button (MouseEvent.BUTTON1
)int getX()
int getY()
java.awt.Point getLocation()
java.awt.Point getLastLocation()
Point
int getMoveSpeedTime()
int getMouseCrossX()
int getMouseCrossY()
IMouseAPI.CrossColor getMouseCrossColor()
int getMouseCrossState()