|
Préférences
Moteurs de recherche
|
||||||||||||||||
| JavaTM 2 Platform Std. Ed. v1.6.0
javax.swing.filechooser
|
|||||||||||||||||
| Constructor Summary | |
|---|---|
FileNameExtensionFilter(String description,
String... extensions)
Creates a FileNameExtensionFilter with the specified
description and file name extensions. |
|
| Method Summary | |
|---|---|
boolean |
accept(File f)
Tests the specified file, returning true if the file is accepted, false otherwise. |
String |
getDescription()
The description of this filter. |
String[] |
getExtensions()
Returns the set of file name extensions files are tested against. |
String |
toString()
Returns a string representation of the FileNameExtensionFilter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FileNameExtensionFilter(String description, String... extensions)
FileNameExtensionFilter with the specified
description and file name extensions. The returned FileNameExtensionFilter will accept all directories and any
file with a file name extension contained in extensions.
description - textual description for the filter, may be
nullextensions - the accepted file name extensions
IllegalArgumentException - if extensions is null, empty,
contains null, or contains an empty stringaccept(java.io.File)| Method Detail |
|---|
public boolean accept(File f)
FileFilter, or the file is a directory.
accept in class FileFilterf - the File to test
public String getDescription()
getDescription in class FileFilterFileView.getName(java.io.File)public String[] getExtensions()
public String toString()
FileNameExtensionFilter.
This method is intended to be used for debugging purposes,
and the content and format of the returned string may vary
between implementations.
FileNameExtensionFilter