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.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
| SnapshotWindowBridge() | Creates a simulated window of size 0 × 0, with the default cursor and an empty clipboard. |
Methods
Section titled “Methods”Position and size
Section titled “Position and size”| Returns | Signature | Summary |
|---|---|---|
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. |
Hover and tooltips
Section titled “Hover and tooltips”| Returns | Signature | Summary |
|---|---|---|
Cursor | getCursor() | Returns the last cursor that JOID set, which the cursor command checks. |
void | setCursor(Cursor cursor) | Records the cursor that JOID shows. |
| Returns | Signature | Summary |
|---|---|---|
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. |
Queries
Section titled “Queries”| Returns | Signature | Summary |
|---|---|---|
String | getClipboard() | Returns the text of the clipboard, empty at first. |
Actions
Section titled “Actions”| Returns | Signature | Summary |
|---|---|---|
void | setClipboard(String clipboard) | Sets the text of the clipboard. |
Creation details
Section titled “Creation details”SnapshotWindowBridge
Section titled “SnapshotWindowBridge”SnapshotWindowBridge()
Creates a simulated window of size 0 × 0, with the default cursor and an empty clipboard.
Method details
Section titled “Method details”getWidth
Section titled “getWidth”int getWidth()
Returns the width of the window, in screen pixels.
setWidth
Section titled “setWidth”void setWidth(int width)
Sets the width of the window.
getHeight
Section titled “getHeight”int getHeight()
Returns the height of the window, in screen pixels.
setHeight
Section titled “setHeight”void setHeight(int height)
Sets the height of the window.
getCursor
Section titled “getCursor”Cursor getCursor()
Returns the last cursor that JOID set, which the cursor command checks.
setCursor
Section titled “setCursor”void setCursor(Cursor cursor)
Records the cursor that JOID shows.
isMouseGrabbed
Section titled “isMouseGrabbed”boolean isMouseGrabbed()
Returns false.
isKeyDown
Section titled “isKeyDown”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.
release
Section titled “release”this release(Key... keys) fluent
Releases these keys and returns the bridge.
getKeys
Section titled “getKeys”Set<Key> getKeys()
Returns the held keys, which the commands change, as a read-only set.
getMouseX
Section titled “getMouseX”double getMouseX()
Returns the horizontal position of the mouse.
setMouseX
Section titled “setMouseX”void setMouseX(double mouseX)
Sets the horizontal position of the mouse, in screen pixels.
getMouseY
Section titled “getMouseY”double getMouseY()
Returns the vertical position of the mouse.
setMouseY
Section titled “setMouseY”void setMouseY(double mouseY)
Sets the vertical position of the mouse, in screen pixels.
getClipboard
Section titled “getClipboard”String getClipboard()
Returns the text of the clipboard, empty at first.
setClipboard
Section titled “setClipboard”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
