Package com.oorian.html.js.clipboard
Class ClipboardReadEvent
java.lang.Object
com.oorian.messaging.events.Event<ClipboardListener>
com.oorian.messaging.events.client.ClientEvent<ClipboardListener>
com.oorian.html.js.clipboard.ClipboardReadEvent
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 Summary
ConstructorsConstructorDescriptionClipboardReadEvent(String text) Constructs a ClipboardReadEvent with the clipboard text. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispatchTo(ClipboardListener listener) Dispatches this event to the specified listener.getText()Returns the text read from the clipboard.toString()Methods inherited from class com.oorian.messaging.events.client.ClientEvent
getSource, getTarget, setSource, setTarget
-
Constructor Details
-
ClipboardReadEvent
Constructs a ClipboardReadEvent with the clipboard text.- Parameters:
text- The text read from the clipboard.
-
-
Method Details
-
getText
Returns the text read from the clipboard.- Returns:
- The clipboard text.
-
dispatchTo
Description copied from class:EventDispatches this event to the specified listener.Subclasses implement this method to call the appropriate handler method on the listener interface.
- Specified by:
dispatchToin classEvent<ClipboardListener>- Parameters:
listener- the listener to dispatch this event to
-
toString
-