|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--javax.swing.filechooser.FileFilter
|
+--visualmodeler.DefaultFileFilter
A DefaultFileFilter, once implemented, can be set on a JFileChooser to keep unwanted files from appearing in the directory listing.
| Constructor Summary | |
DefaultFileFilter(java.lang.String[] ext,
java.lang.String desc)
Construct a default file filter to filter some file extensions. |
|
DefaultFileFilter(java.lang.String ext,
java.lang.String desc)
Construct a default file filter to filter a file extension. |
|
| Method Summary | |
boolean |
accept(java.io.File f)
Whether the given file is accepted by this filter. |
java.lang.String |
getDescription()
Get the description of this filter. |
java.lang.String |
getExtension(java.io.File f)
Get the file extension of the file. |
java.lang.String |
getFileNameOnly(java.lang.String fileName)
Get the file name without its file extension. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultFileFilter(java.lang.String ext,
java.lang.String desc)
ext - File extension to filterdesc - Description of this filter, eg. "JPG and GIF Images"
public DefaultFileFilter(java.lang.String[] ext,
java.lang.String desc)
ext - File extensions to filterdesc - Description of this filter, eg. "JPG and GIF Images"| Method Detail |
public boolean accept(java.io.File f)
accept in class javax.swing.filechooser.FileFilterf - File
true if file is accepted
false otherwise.public java.lang.String getExtension(java.io.File f)
f - File
public java.lang.String getFileNameOnly(java.lang.String fileName)
fileName - Filename with file extension
public java.lang.String getDescription()
getDescription in class javax.swing.filechooser.FileFilter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||