|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.filechooser.FileFilter
org.proteinshader.structure.io.filters.PDBFileFilter
public class PDBFileFilter
Checks if a file has a ".pdb" file ending.
Java's class javax.swing.filechooser.FileFilter is abstract and
requires a subclass to define a boolean accept( File ) method and a
getDescription() method. An example of how to create a FileFilter for
image files can be found at
Filtering the List of Files in the sun tutorial pages.
| Constructor Summary | |
|---|---|
PDBFileFilter()
Constructs a PDBFileFilter. |
|
| Method Summary | |
|---|---|
boolean |
accept(File file)
Returns true if the file is a directory or has a "pdb" extension. |
String |
getDescription()
Constructs a PDBFileFilter. |
String |
getFilenameExtension(File file)
Obtains the filename extension (the letters after last '.') if it exists and return it as lowercase letters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PDBFileFilter()
| Method Detail |
|---|
public String getDescription()
getDescription in class FileFilterpublic boolean accept(File file)
accept in class FileFilterfile - the file to test.
public String getFilenameExtension(File file)
file - the file to get the filename extension from.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||