|
Copyright 2012-02-25 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.filechooser.FileFilter
ch.randelshofer.io.ExtensionFileFilter
public class ExtensionFileFilter
Accepts all directories, and all files which have the given extensions.
| Constructor Summary | |
|---|---|
ExtensionFileFilter(java.lang.String[] extensions,
java.lang.String description)
Creates new ExtensionFileFilter which accepts all directories and all files with the given extension. |
|
ExtensionFileFilter(java.lang.String extension,
java.lang.String description)
Creates new ExtensionFileFilter which accepts all directories and all files with the given extension. |
|
| Method Summary | |
|---|---|
boolean |
accept(java.io.File f)
Whether the given file is accepted by this filter. |
boolean |
accept(java.io.File dir,
java.lang.String name)
Tests if a specified file should be included in a file list. |
java.lang.String |
getDescription()
The description of this filter. |
java.lang.String |
getExtension(java.lang.String filename)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExtensionFileFilter(java.lang.String extension,
java.lang.String description)
extension - The extension which shall be accepted.description - The description of the FileFilter
public ExtensionFileFilter(java.lang.String[] extensions,
java.lang.String description)
extensions - The extension which shall be accepted.description - The description of the FileFilter| Method Detail |
|---|
public boolean accept(java.io.File f)
accept in interface java.io.FileFilteraccept in class javax.swing.filechooser.FileFilter
public boolean accept(java.io.File dir,
java.lang.String name)
accept in interface java.io.FilenameFilterdir - the directory in which the file was found.name - the name of the file.
true if and only if the name should be
included in the file list; false otherwise.public java.lang.String getDescription()
getDescription in class javax.swing.filechooser.FileFilterFileView.getName(java.io.File)public java.lang.String getExtension(java.lang.String filename)
|
Copyright 2012-02-25 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||