Class ByteArrayUploadField

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<com.vaadin.flow.component.html.Div>
org.vaadin.firitin.fields.ByteArrayUploadField
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ByteArrayUploadField,byte[]>,byte[]>, Serializable

@StyleSheet("context://frontend/org/vaadin/firitin/bytearrayuploadfield.css") public class ByteArrayUploadField extends com.vaadin.flow.component.Composite<com.vaadin.flow.component.html.Div> implements com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ByteArrayUploadField,byte[]>,byte[]>
Author:
mstahv
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasValue

    com.vaadin.flow.component.HasValue.ValueChangeEvent<V extends Object>, com.vaadin.flow.component.HasValue.ValueChangeListener<E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<?>>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.vaadin.flow.shared.Registration
    addValueChangeListener(com.vaadin.flow.component.HasValue.ValueChangeListener<? super com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ByteArrayUploadField,byte[]>> listener)
     
     
     
    com.vaadin.flow.component.upload.Upload
     
    byte[]
     
    boolean
     
    boolean
     
    static String
    readableFileSize(long size)
     
    void
    setDownloadFileName(String downloadFileName)
    Sets the name of the file that people download if they download the file directly
    void
    setFileDownloadText(String fileDownloadText)
    Sets the (formatted text) that is shown in a link if the value is not null to download the contents of the byte array.
    void
    setReadOnly(boolean bln)
     
    void
     
    void
    setUploadCaption(String uploadCaption)
     
    void
    setValue(byte[] v)
     

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

    getChildren, getContent, getElement, initContent

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

    addListener, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName

    Methods inherited from interface com.vaadin.flow.component.HasValue

    clear, getEmptyValue, getOptionalValue, isEmpty
  • Constructor Details

    • ByteArrayUploadField

      public ByteArrayUploadField()
  • Method Details

    • getDownloadFileName

      public String getDownloadFileName()
    • setDownloadFileName

      public void setDownloadFileName(String downloadFileName)
      Sets the name of the file that people download if they download the file directly
      Parameters:
      downloadFileName - the file name
    • setFileDownloadText

      public void setFileDownloadText(String fileDownloadText)
      Sets the (formatted text) that is shown in a link if the value is not null to download the contents of the byte array. String parameter for formatting is the human readable size of the byte array.
      Parameters:
      fileDownloadText - the text, default "download ( %s )"
    • getFileDownloadText

      public String getFileDownloadText()
    • addValueChangeListener

      public com.vaadin.flow.shared.Registration addValueChangeListener(com.vaadin.flow.component.HasValue.ValueChangeListener<? super com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ByteArrayUploadField,byte[]>> listener)
      Specified by:
      addValueChangeListener in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ByteArrayUploadField,byte[]>,byte[]>
    • setReadOnly

      public void setReadOnly(boolean bln)
      Specified by:
      setReadOnly in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ByteArrayUploadField,byte[]>,byte[]>
    • isReadOnly

      public boolean isReadOnly()
      Specified by:
      isReadOnly in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ByteArrayUploadField,byte[]>,byte[]>
    • setRequiredIndicatorVisible

      public void setRequiredIndicatorVisible(boolean bln)
      Specified by:
      setRequiredIndicatorVisible in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ByteArrayUploadField,byte[]>,byte[]>
    • isRequiredIndicatorVisible

      public boolean isRequiredIndicatorVisible()
      Specified by:
      isRequiredIndicatorVisible in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ByteArrayUploadField,byte[]>,byte[]>
    • setValue

      public void setValue(byte[] v)
      Specified by:
      setValue in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ByteArrayUploadField,byte[]>,byte[]>
    • getValue

      public byte[] getValue()
      Specified by:
      getValue in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ByteArrayUploadField,byte[]>,byte[]>
    • readableFileSize

      public static String readableFileSize(long size)
    • getUpload

      public com.vaadin.flow.component.upload.Upload getUpload()
    • setUploadCaption

      public void setUploadCaption(String uploadCaption)