- java.lang.Object
-
- org.testfx.service.adapter.impl.GlassRobotAdapter
-
- All Implemented Interfaces:
RobotAdapter
public abstract class GlassRobotAdapter extends Object implements RobotAdapter
-
-
Field Summary
Fields Modifier and Type Field Description protected ObjectglassRobotprotected static intRETRIEVAL_TIMEOUT_IN_MILLIS
-
Constructor Summary
Constructors Constructor Description GlassRobotAdapter()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static GlassRobotAdaptercreateGlassRobot()ImagegetCaptureRegion(Rectangle2D region)Captures a region of the screen.ImagegetCaptureRegionRaw(Rectangle2D region)protected ObjectgetRobot()protected abstract ImagegetScreenCapture(Rectangle2D region, boolean raw)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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.testfx.service.adapter.RobotAdapter
getCapturePixelColor, getMouseLocation, keyPress, keyRelease, mouseMove, mousePress, mouseRelease, robotCreate, robotDestroy
-
-
-
-
Field Detail
-
RETRIEVAL_TIMEOUT_IN_MILLIS
protected static final int RETRIEVAL_TIMEOUT_IN_MILLIS
- See Also:
- Constant Field Values
-
glassRobot
protected Object glassRobot
-
-
Method Detail
-
createGlassRobot
public static GlassRobotAdapter 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 Image getCaptureRegion(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 Image getCaptureRegionRaw(Rectangle2D region)
-
getRobot
protected final Object getRobot()
-
getScreenCapture
protected abstract Image getScreenCapture(Rectangle2D region, boolean raw)
-
-