|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.filechooser.FileFilter
gate.util.ExtensionFileFilter
public class ExtensionFileFilter
Implementation of a file name filter.
This class is used by JFileChooser to filter the
displayed files by their extension.
| Constructor Summary | |
|---|---|
ExtensionFileFilter()
Builds a new ExtensionFileFilter. |
|
ExtensionFileFilter(String description,
String... extensions)
Creates a FileNameExtensionFilter with the specified description and file name extensions. |
|
| Method Summary | |
|---|---|
boolean |
accept(File f)
Checks a file for compliance with the requested extensions. |
void |
addExtension(String extension)
Adds a new extension to the list of accepted extensions. |
String |
getDescription()
Returns the user-frielndly description for the files, e.g. |
String[] |
getExtensions()
|
void |
setDescription(String description)
Sets the user friendly description for the accepted files. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ExtensionFileFilter()
public ExtensionFileFilter(String description,
String... extensions)
description - textual description for the filter, may be nullextensions - the accepted file name extensions| Method Detail |
|---|
public boolean accept(File f)
accept in interface FileFilteraccept in class FileFilterf - file to test with this filterpublic String getDescription()
getDescription in class FileFilterpublic void addExtension(String extension)
extension - file extension used to filter filespublic void setDescription(String description)
description - description for this file filterpublic String[] getExtensions()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||