|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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(String[] ext,
String desc)
Overloaded method. |
|
DefaultFileFilter(String ext,
String desc)
Constructs a default file filter to filter a file extension |
Method Summary | |
boolean |
accept(File file)
Checks whether the given file is accepted by this filter or not |
String |
getDescription()
Gets the description of this filter |
String |
getExtension(File file)
Gets the file extension of a given File object |
String |
getFileNameOnly(String fileName)
Gets the file name without its file extension |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultFileFilter(String ext, String desc)
ext
- File extension to filterdesc
- Description of this filter, eg. "JPG and GIF Images"public DefaultFileFilter(String[] ext, String desc)
ext
- File extensions to filterdesc
- Description of this filter, eg. "JPG and GIF Images"Method Detail |
public boolean accept(File file)
accept
in class javax.swing.filechooser.FileFilter
file
- A File object
public String getExtension(File file)
file
- A File extension
public String getFileNameOnly(String fileName)
fileName
- A filename with file extension
public 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 |