|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.filechooser.FileFilter
com.evanmclean.evlib.swing.filechooser.ExtFilesFilter
public class ExtFilesFilter
File filter for the JFileChooser that accepts files of the specified extension(s).
| Constructor Summary | |
|---|---|
ExtFilesFilter(String description)
|
|
ExtFilesFilter(String description,
String ext)
|
|
ExtFilesFilter(String description,
String ext,
String... exts_arr)
|
|
| Method Summary | |
|---|---|
boolean |
accept(File file)
|
boolean |
addExtension(String ext)
Add an extension to be allowed. |
String |
getDescription()
|
String[] |
getExtensions()
|
boolean |
isFilesOnly()
|
boolean |
isShowFolders()
|
boolean |
removeExtension(String ext)
Remove the extension from the filer. |
void |
setFilesOnly(boolean files_only)
Set if the filer does not accepts folders (directories) with one of the allowed extensions (default true). |
void |
setShowFolders(boolean show_folders)
Set if the filter accepts folders (directories) irrespective of the extension (default true). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExtFilesFilter(String description)
public ExtFilesFilter(String description,
String ext)
public ExtFilesFilter(String description,
String ext,
String... exts_arr)
| Method Detail |
|---|
public boolean accept(File file)
accept in class FileFilterpublic boolean addExtension(String ext)
ext -
true if the extension is not already included.public String getDescription()
getDescription in class FileFilterpublic String[] getExtensions()
public boolean isFilesOnly()
public boolean isShowFolders()
public boolean removeExtension(String ext)
ext -
public void setFilesOnly(boolean files_only)
files_only - public void setShowFolders(boolean show_folders)
show_folders -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||