Class ClipboardCopy
java.lang.Object
com.vaadin.flow.component.clipboard.ClipboardCopy
- All Implemented Interfaces:
Registration,Serializable
Handle for a client-side click-to-copy registration created by
Clipboard.copyOnClick(Component, String) (and overloads).
Use setValue(String) to push a new text value to the client without
re-installing the handler. Call remove() to detach the click handler
when the trigger should no longer copy.
- See Also:
-
Method Summary
-
Method Details
-
setValue
Updates the text that will be copied when the trigger element is clicked. The new value is synchronized to the client without a server round-trip on click.Only meaningful for handles returned by the
copyOnClickstring overloads. ForcopyOnClick(trigger, sourceComponent)andcopyImageOnClick, the value is read live from the source on each click and this setter has no effect.- Parameters:
text- the new text to copy;nullis treated as an empty string
-
remove
public void remove()Removes the client-side click handler and releases any return channels registered for success/error callbacks. Idempotent.- Specified by:
removein interfaceRegistration- See Also:
-