public class ExtensionFileFilter
extends javax.swing.filechooser.FileFilter
Constructor and Description |
---|
ExtensionFileFilter(java.lang.String description,
java.lang.String extension)
Creates a new instance.
|
ExtensionFileFilter(java.lang.String description,
java.lang.String[] extensions)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.io.File pathname) |
java.lang.String |
getDescription() |
java.util.Set<java.lang.String> |
getExtensions()
Returns an unmodifiable set with the filename extensions.
|
java.io.File |
makeAcceptable(java.io.File pathname)
Appends the extension to the filename, in case it is missing.
|
public ExtensionFileFilter(java.lang.String description, java.lang.String extension)
description
- A human readable description.extension
- The filename extension. This will be converted to
lower-case by this method.public ExtensionFileFilter(java.lang.String description, java.lang.String[] extensions)
description
- A human readable description.extensions
- The filename extensions. These will be converted to
lower-case by this method.public java.util.Set<java.lang.String> getExtensions()
public boolean accept(java.io.File pathname)
accept
in class javax.swing.filechooser.FileFilter
public java.io.File makeAcceptable(java.io.File pathname)
public java.lang.String getDescription()
getDescription
in class javax.swing.filechooser.FileFilter