Class FileSettings

    • Constructor Detail

      • FileSettings

        public FileSettings()
    • Method Detail

      • getThis

        protected FileSettings getThis()
        Description copied from class: BasicSettings
        Returns the exact type of the this reference.
        It's a way to recover the type of the this object in a class hierarchy (cf. getThis "trick").
        Specified by:
        getThis in class BasicSettings<FileSettings>
        Returns:
        The exact type of the this reference
      • singleFile

        public FileSettings singleFile()
        Specify the current control accepts only one file.
        Returns:
        a reference to this object - used to chain calls
      • resizeImage

        public FileSettings resizeImage​(int maxWidth,
                                        int maxHeight)
        Specify the size to which the images to upload are resized.
        Parameters:
        maxWidth - Maximum width
        maxHeight - Maximum height
        Returns:
        a reference to this object - used to chain calls
      • resizeImage

        public FileSettings resizeImage​(int maxWidth,
                                        int maxHeight,
                                        int quality)
        Specify the size to which the images to upload are resized.
        Parameters:
        maxWidth - Maximum width
        maxHeight - Maximum height
        quality - quality of the image to resize
        Returns:
        a reference to this object - used to chain calls
      • resizeImage

        public FileSettings resizeImage​(java.lang.String resizeImage)
        Resize images from the given parameter at format "{maxWidth}x{maxHeight}x{quality}"
        Parameters:
        resizeImage - defines how to resize images using the following format: "{maxWidth}x{maxHeight}x{quality}"
        Returns:
        a reference to this object - used to chain calls
      • ajaxToken

        public FileSettings ajaxToken​(java.lang.String token)
        Specify the Ajax token. Append a input hidden with name is plupload-token and value is the given token.
        Parameters:
        token - Ajax token
        Returns:
        a reference to this object - used to chain calls
      • selectedFileLabel

        public FileSettings selectedFileLabel​(java.lang.String label,
                                              java.lang.String... otherLabels)
        Specify the labels of the files already selected.
        Parameters:
        label - The first file label
        otherLabels - The other file labels
        Returns:
        a reference to this object - used to chain calls
      • selectedFileLabel

        public FileSettings selectedFileLabel​(java.lang.String[] labels)
        Specify the labels of the files already selected.
        Parameters:
        labels - Array of file labels
        Returns:
        a reference to this object - used to chain calls