Class VizImageEncodeEvent

java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<Viz>
de.f0rce.viz.events.VizImageEncodeEvent
All Implemented Interfaces:
java.io.Serializable

@DomEvent("viz-image-encode")
public class VizImageEncodeEvent
extends com.vaadin.flow.component.ComponentEvent<Viz>
Event for receiving the uri of the rendered/displayed graph.
Author:
David "F0rce" Dodlek
See Also:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    VizImageEncodeEvent​(Viz source, boolean fromClient, java.lang.String imageUri)  
  • Method Summary

    Modifier and Type Method Description
    byte[] getImageBase64()
    Returns the cropped image uri as Base64 encoded byte array.
    java.lang.String getImageUri()
    Returns the encoded image uri.

    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

    • VizImageEncodeEvent

      public VizImageEncodeEvent​(Viz source, boolean fromClient, @EventData("event.detail.imageUri") java.lang.String imageUri)
  • Method Details

    • getImageUri

      public java.lang.String getImageUri()
      Returns the encoded image uri.
      Returns:
      String
    • getImageBase64

      public byte[] getImageBase64()
      Returns the cropped image uri as Base64 encoded byte array. If the image uri does not contain "image/*;base64," the uri will just be decoded to not throw a null pointer exception.
      Returns:
      byte[]