Class ImageEncode

java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<SignaturePad>
de.f0rce.signaturepad.ImageEncode
All Implemented Interfaces:
Serializable

@DomEvent("image-encode") public class ImageEncode extends com.vaadin.flow.component.ComponentEvent<SignaturePad>
This class is used to listen to the image-encode event sent by the frontend. It contains the image URI and the MIME-Type.
Author:
David "F0rce" Dodlek
See Also:
  • Constructor Details

    • ImageEncode

      public ImageEncode(SignaturePad source, boolean fromClient, @EventData("event.detail.image") String image, @EventData("event.detail.type") String type, @EventData("event.detail.isEmpty") boolean isEmpty)
  • Method Details

    • getImage

      public String getImage()
      Returns the dataUrl of the encoded image.
      Returns:
      String
    • getType

      public String getType()
      Returns the type, the image has been encoded with.
      Returns:
      String
    • isEmpty

      public boolean isEmpty()
      Returns if the signature is empty.
      Returns:
      boolean