public class AwtRobotAdapter extends java.lang.Object implements RobotAdapter<java.awt.Robot>
| Constructor and Description |
|---|
AwtRobotAdapter() |
| Modifier and Type | Method and Description |
|---|---|
javafx.scene.paint.Color |
getCapturePixelColor(javafx.geometry.Point2D location)
Gets the color of a pixel at the given JavaFx coordinates.
|
javafx.scene.image.Image |
getCaptureRegion(javafx.geometry.Rectangle2D region)
Captures a region of the screen.
|
javafx.scene.image.Image |
getCaptureRegionRaw(javafx.geometry.Rectangle2D region) |
javafx.geometry.Point2D |
getMouseLocation()
Returns the current position of the cursor in JavaFx coordinates
|
void |
keyPress(javafx.scene.input.KeyCode key)
Function used to make the robot press a key.
|
void |
keyRelease(javafx.scene.input.KeyCode key)
Function used to make the robot release a key.
|
void |
mouseMove(javafx.geometry.Point2D location)
Moves the mouse cursor to the given position in JavaFx coordinates
|
void |
mousePress(javafx.scene.input.MouseButton button)
Makes the robot press a mouse button.
|
void |
mouseRelease(javafx.scene.input.MouseButton button)
Makes the robot release a mouse button.
|
void |
mouseWheel(int wheelAmount)
Makes the robot to simulate a action of the mouse wheel.
Negative values indicate movement up/away from the user, positive values indicate movement down/towards the user. |
void |
robotCreate()
Creates a robot.
|
void |
robotDestroy()
Destroys the robot
|
public void robotCreate()
RobotAdapterrobotCreate in interface RobotAdapter<java.awt.Robot>public void robotDestroy()
RobotAdapterrobotDestroy in interface RobotAdapter<java.awt.Robot>public void keyPress(javafx.scene.input.KeyCode key)
RobotAdapterkeyPress in interface RobotAdapter<java.awt.Robot>key - the key to press (must exist on a keyboard)public void keyRelease(javafx.scene.input.KeyCode key)
RobotAdapterkeyRelease in interface RobotAdapter<java.awt.Robot>key - the key to press (must exist on a keyboard)public javafx.geometry.Point2D getMouseLocation()
RobotAdaptergetMouseLocation in interface RobotAdapter<java.awt.Robot>public void mouseMove(javafx.geometry.Point2D location)
RobotAdaptermouseMove in interface RobotAdapter<java.awt.Robot>location - the location in JavaFx coordinates to move the cursor topublic void mousePress(javafx.scene.input.MouseButton button)
RobotAdaptermousePress in interface RobotAdapter<java.awt.Robot>button - the button to presspublic void mouseRelease(javafx.scene.input.MouseButton button)
RobotAdaptermouseRelease in interface RobotAdapter<java.awt.Robot>button - the button to releasepublic void mouseWheel(int wheelAmount)
RobotAdaptermouseWheel in interface RobotAdapter<java.awt.Robot>wheelAmount - the amount to scrollpublic javafx.scene.paint.Color getCapturePixelColor(javafx.geometry.Point2D location)
RobotAdaptergetCapturePixelColor in interface RobotAdapter<java.awt.Robot>location - of the pixel in JavaFx coordinates, to retrieve the color forpublic javafx.scene.image.Image getCaptureRegion(javafx.geometry.Rectangle2D region)
RobotAdaptergetCaptureRegion in interface RobotAdapter<java.awt.Robot>region - the region to capture in JavaFx coordinatespublic javafx.scene.image.Image getCaptureRegionRaw(javafx.geometry.Rectangle2D region)