Skip to content

SnapshotWindowBridge

final class SnapshotWindowBridge
Implements: IWindowBridge
Package: dev.joid.test.snapshot · Module: tool-testkit · Source: SnapshotWindowBridge.java

The window bridge of the snapshot runner, whose size, mouse, held keys, cursor and clipboard the commands set.

ReturnsSignatureSummary
SnapshotWindowBridge()Creates a simulated window of size 0 × 0, with the default cursor and an empty clipboard.

ReturnsSignatureSummary
intgetWidth()Returns the width of the window, in screen pixels.
voidsetWidth(int width)Sets the width of the window.
intgetHeight()Returns the height of the window, in screen pixels.
voidsetHeight(int height)Sets the height of the window.
ReturnsSignatureSummary
CursorgetCursor()Returns the last cursor that JOID set, which the cursor command checks.
voidsetCursor(Cursor cursor)Records the cursor that JOID shows.
ReturnsSignatureSummary
booleanisMouseGrabbed()Returns false.
booleanisKeyDown(Key physicalKey)If true, a command holds that key.
thispress(Key… keys) fluentHolds these keys, as the commands do, and returns the bridge.
thisrelease(Key… keys) fluentReleases these keys and returns the bridge.
Set<Key>getKeys()Returns the held keys, which the commands change, as a read-only set.
doublegetMouseX()Returns the horizontal position of the mouse.
voidsetMouseX(double mouseX)Sets the horizontal position of the mouse, in screen pixels.
doublegetMouseY()Returns the vertical position of the mouse.
voidsetMouseY(double mouseY)Sets the vertical position of the mouse, in screen pixels.
ReturnsSignatureSummary
StringgetClipboard()Returns the text of the clipboard, empty at first.
ReturnsSignatureSummary
voidsetClipboard(String clipboard)Sets the text of the clipboard.

SnapshotWindowBridge()

Creates a simulated window of size 0 × 0, with the default cursor and an empty clipboard.

int getWidth()

Returns the width of the window, in screen pixels.

void setWidth(int width)

Sets the width of the window.

int getHeight()

Returns the height of the window, in screen pixels.

void setHeight(int height)

Sets the height of the window.

Cursor getCursor()

Returns the last cursor that JOID set, which the cursor command checks.

void setCursor(Cursor cursor)

Records the cursor that JOID shows.

boolean isMouseGrabbed()

Returns false.

boolean isKeyDown(Key physicalKey)

If true, a command holds that key.

this press(Key... keys) fluent

Holds these keys, as the commands do, and returns the bridge.

this release(Key... keys) fluent

Releases these keys and returns the bridge.

Set<Key> getKeys()

Returns the held keys, which the commands change, as a read-only set.

double getMouseX()

Returns the horizontal position of the mouse.

void setMouseX(double mouseX)

Sets the horizontal position of the mouse, in screen pixels.

double getMouseY()

Returns the vertical position of the mouse.

void setMouseY(double mouseY)

Sets the vertical position of the mouse, in screen pixels.

String getClipboard()

Returns the text of the clipboard, empty at first.

void setClipboard(String clipboard)

Sets the text of the clipboard.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page