org.jets3t.apps.uploader
Class UploaderFileExtensionFilter
java.lang.Object
javax.swing.filechooser.FileFilter
org.jets3t.apps.uploader.UploaderFileExtensionFilter
public class UploaderFileExtensionFilter
- extends javax.swing.filechooser.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.
Constructor Summary |
UploaderFileExtensionFilter(java.lang.String description,
java.util.List fileExtensionsList)
Construct an extension-based file filter |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UploaderFileExtensionFilter
public UploaderFileExtensionFilter(java.lang.String description,
java.util.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".
accept
public boolean accept(java.io.File file)
- Specified by:
accept
in class javax.swing.filechooser.FileFilter
- 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 java.lang.String getDescription()
- Specified by:
getDescription
in class javax.swing.filechooser.FileFilter