Package org.jets3t.apps.uploader
Class UploaderFileExtensionFilter
- java.lang.Object
-
- javax.swing.filechooser.FileFilter
-
- org.jets3t.apps.uploader.UploaderFileExtensionFilter
-
public class UploaderFileExtensionFilter extends FileFilter
Defines which files can be selected within the Uploader's file chooser for upload to S3. Files are filtered based on their filename extension.- Author:
- James Murty
-
-
Constructor Summary
Constructors Constructor Description UploaderFileExtensionFilter(String description, List fileExtensionsList)
Construct an extension-based file filter
-
-
-
Constructor Detail
-
UploaderFileExtensionFilter
public UploaderFileExtensionFilter(String description, List fileExtensionsList)
Construct an extension-based file filter- Parameters:
description
- the name for this filter, such as "Movie files"fileExtensionsList
- a list of file extensions that the filter will accept, eg "avi", "mpg".
-
-
Method Detail
-
accept
public boolean accept(File file)
- Specified by:
accept
in classFileFilter
- Returns:
- True if the file is a Directory, or the file has an extension that matches one of the allowed extensions provided to this class's constructor. False otherwise.
-
getDescription
public String getDescription()
- Specified by:
getDescription
in classFileFilter
-
-