Package limn.backend.spi
Record Class DragRequest
java.lang.Object
java.lang.Record
limn.backend.spi.DragRequest
- Record Components:
content- what is draggedactions- what a target may do with it, the source's preference firstimage- the picture under the pointer, in framebuffer pixels, or null for nonex- where the picture's left edge is as the drag begins, in the window's logical pointsy- where the picture's top edge is as the drag begins, in the window's logical pointswidth- the picture's width on screen, in logical pointsheight- the picture's height on screen, in logical pointsended- told on the UI thread, once, when the system's drag is over, with the action a target carried out in this program or another, and with no action when nothing took it
public record DragRequest(Transfer content, Set<DropAction> actions, @Nullable Image image, float x, float y, float width, float height, Consumer<@Nullable DropAction> ended)
extends Record
A drag the scene hands to the system: what it carries, what may be done with it, the picture
the system shows under the pointer, and who hears the end.
-
Constructor Summary
ConstructorsConstructorDescriptionDragRequest(Transfer content, Set<DropAction> actions, @Nullable Image image, float x, float y, float width, float height, Consumer<@Nullable DropAction> ended) Creates an instance of aDragRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionactions()Returns the value of theactionsrecord component.content()Returns the value of thecontentrecord component.Consumer<@Nullable DropAction> ended()Returns the value of theendedrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatheight()Returns the value of theheightrecord component.@Nullable Imageimage()Returns the value of theimagerecord component.final StringtoString()Returns a string representation of this record class.floatwidth()Returns the value of thewidthrecord component.floatx()Returns the value of thexrecord component.floaty()Returns the value of theyrecord component.
-
Constructor Details
-
DragRequest
public DragRequest(Transfer content, Set<DropAction> actions, @Nullable Image image, float x, float y, float width, float height, Consumer<@Nullable DropAction> ended) Creates an instance of aDragRequestrecord class.- Parameters:
content- the value for thecontentrecord componentactions- the value for theactionsrecord componentimage- the value for theimagerecord componentx- the value for thexrecord componenty- the value for theyrecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord componentended- the value for theendedrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-
actions
Returns the value of theactionsrecord component.- Returns:
- the value of the
actionsrecord component
-
image
Returns the value of theimagerecord component.- Returns:
- the value of the
imagerecord component
-
x
public float x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public float y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
width
public float width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public float height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
ended
Returns the value of theendedrecord component.- Returns:
- the value of the
endedrecord component
-