Record Class ExtensionContext.MouseEvent
java.lang.Object
java.lang.Record
org.openpatch.scratch.extension.ExtensionContext.MouseEvent
- Enclosing interface:
ExtensionContext
public static record ExtensionContext.MouseEvent(ExtensionContext.MouseEvent.Kind kind, MouseCode button, double x, double y, double wheel)
extends Record
Something the mouse did, in stage coordinates.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionMouseEvent(ExtensionContext.MouseEvent.Kind kind, MouseCode button, double x, double y, double wheel) Creates an instance of aMouseEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbutton()Returns the value of thebuttonrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.final StringtoString()Returns a string representation of this record class.doublewheel()Returns the value of thewheelrecord component.doublex()Returns the value of thexrecord component.doubley()Returns the value of theyrecord component.
-
Constructor Details
-
MouseEvent
public MouseEvent(ExtensionContext.MouseEvent.Kind kind, MouseCode button, double x, double y, double wheel) Creates an instance of aMouseEventrecord class.- Parameters:
kind- the value for thekindrecord componentbutton- the value for thebuttonrecord componentx- the value for thexrecord componenty- the value for theyrecord componentwheel- the value for thewheelrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
button
Returns the value of thebuttonrecord component.- Returns:
- the value of the
buttonrecord component
-
x
public double x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public double y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
wheel
public double wheel()Returns the value of thewheelrecord component.- Returns:
- the value of the
wheelrecord component
-