Class ImageEncode

java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<SignaturePad>
de.f0rce.signaturepad.ImageEncode
All Implemented Interfaces:
java.io.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:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    ImageEncode​(SignaturePad source, boolean fromClient, java.lang.String image, java.lang.String type, java.lang.Boolean isEmpty)  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getImage()
    Returns the dataUrl of the encoded image.
    java.lang.String getType()
    Returns the type, the image has been encoded with.
    boolean isEmpty()
    Returns if the signature is empty.

    Methods inherited from class com.vaadin.flow.component.ComponentEvent

    getSource, isFromClient, unregisterListener

    Methods inherited from class java.util.EventObject

    toString

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ImageEncode

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

    • getImage

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

      public java.lang.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