Package com.vaadin.flow.component.page
Class ClipboardCopy
java.lang.Object
com.vaadin.flow.component.page.ClipboardCopy
- All Implemented Interfaces:
Registration,Serializable
Handle for a client-side click-to-copy registration created by
Clipboard.copyOnClick(com.vaadin.flow.component.Component, String).
Allows updating the text that will be copied and removing the click handler when no longer needed.
- See Also:
-
Method Summary
-
Method Details
-
setValue
Updates the text that will be copied to the clipboard when the trigger element is clicked.The new value is pushed to the client-side so the copy operation can execute without a server round-trip.
- Parameters:
text- the new text to copy, or an empty string ifnull
-
remove
public void remove()Removes the client-side click handler and cleans up associated resources.- Specified by:
removein interfaceRegistration- See Also:
-