Class GlassRobotAdapter
java.lang.Object
org.testfx.service.adapter.impl.GlassRobotAdapter
- All Implemented Interfaces:
RobotAdapter
- Direct Known Subclasses:
PrivateGlassRobotAdapter, PublicGlassRobotAdapter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Objectprivate static booleanprotected static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GlassRobotAdapterfinal javafx.scene.image.ImagegetCaptureRegion(javafx.geometry.Rectangle2D region) Captures a region of the screen.final javafx.scene.image.ImagegetCaptureRegionRaw(javafx.geometry.Rectangle2D region) protected final ObjectgetRobot()protected abstract javafx.scene.image.ImagegetScreenCapture(javafx.geometry.Rectangle2D region, boolean raw) final voidmouseWheel(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.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface RobotAdapter
getCapturePixelColor, getMouseLocation, keyPress, keyRelease, mouseMove, mousePress, mouseRelease, robotCreate, robotDestroy
-
Field Details
-
RETRIEVAL_TIMEOUT_IN_MILLIS
protected static final int RETRIEVAL_TIMEOUT_IN_MILLIS- See Also:
-
glassRobot
-
publicRobot
private static boolean publicRobot
-
-
Constructor Details
-
GlassRobotAdapter
public GlassRobotAdapter()
-
-
Method Details
-
createGlassRobot
-
mouseWheel
public final void mouseWheel(int wheelAmount) Description copied from interface:RobotAdapterMakes 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.- Specified by:
mouseWheelin interfaceRobotAdapter- Parameters:
wheelAmount- the amount to scroll
-
getCaptureRegion
public final javafx.scene.image.Image getCaptureRegion(javafx.geometry.Rectangle2D region) Description copied from interface:RobotAdapterCaptures a region of the screen. The returned Image is in the JavaFx color space. //TODO Due to technical reasons, there might be a deviation.- Specified by:
getCaptureRegionin interfaceRobotAdapter- Parameters:
region- the region to capture in JavaFx coordinates- Returns:
- a image of the region
-
getCaptureRegionRaw
public final javafx.scene.image.Image getCaptureRegionRaw(javafx.geometry.Rectangle2D region) -
getRobot
-
getScreenCapture
protected abstract javafx.scene.image.Image getScreenCapture(javafx.geometry.Rectangle2D region, boolean raw)
-