Class ClipboardReadEvent


public class ClipboardReadEvent extends ClientEvent<ClipboardListener>
Event fired when text has been successfully read from the clipboard.

This event is dispatched to the element that initiated the clipboard read request when the operation completes successfully.

Usage:


 public void onEvent(ClipboardReadEvent event) {
     String pastedText = event.getText();
     textArea.setValue(pastedText);
 }
 
Author:
Marvin P. Warble Jr.
See Also:
  • Constructor Details

    • ClipboardReadEvent

      public ClipboardReadEvent(String text)
      Constructs a ClipboardReadEvent with the clipboard text.
      Parameters:
      text - The text read from the clipboard.
  • Method Details

    • getText

      public String getText()
      Returns the text read from the clipboard.
      Returns:
      The clipboard text.
    • dispatchTo

      public void dispatchTo(ClipboardListener listener)
      Description copied from class: Event
      Dispatches this event to the specified listener.

      Subclasses implement this method to call the appropriate handler method on the listener interface.

      Specified by:
      dispatchTo in class Event<ClipboardListener>
      Parameters:
      listener - the listener to dispatch this event to
    • toString

      public String toString()
      Overrides:
      toString in class Object