Class ByteArrayUploadField

  • All Implemented Interfaces:
    com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ByteArrayUploadField,​byte[]>,​byte[]>, Serializable

    @CssImport("./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:
    Serialized Form
    • 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 Detail

      • ByteArrayUploadField

        public ByteArrayUploadField()
    • Method Detail

      • 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)