|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.filechooser.FileFilter
texturesynthesis.util.FileExtensionFilter
public class FileExtensionFilter
Filters files by the file name extension. To be used with the javax.swing.JFileChooser.
| Field Summary | |
|---|---|
private boolean |
acceptDirectories
Whether to accept directories or not. |
private java.util.Vector<javax.swing.filechooser.FileFilter> |
combinedFilter
A place holder for other filters this filter might use. |
private java.lang.String |
description
The description of this filter. |
private java.util.Vector<java.lang.String> |
extensions
The file name extensions this filter accepts. |
| Constructor Summary | |
|---|---|
FileExtensionFilter()
The constuctor. |
|
| Method Summary | |
|---|---|
boolean |
accept(java.io.File file)
|
void |
addAnotherFilter(javax.swing.filechooser.FileFilter ff)
Adds another filter this filter can use. |
void |
addExtension(java.lang.String extension)
Adds a file name extension this filter should accept. |
java.lang.String |
getDescription()
|
void |
setDescription(java.lang.String description)
Sets the description of this filter. |
private boolean |
stringIsInExtensions(java.lang.String str)
Checks if the given string is already in the set of extensions. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.lang.String description
private java.util.Vector<java.lang.String> extensions
private boolean acceptDirectories
private java.util.Vector<javax.swing.filechooser.FileFilter> combinedFilter
| Constructor Detail |
|---|
public FileExtensionFilter()
| Method Detail |
|---|
public boolean accept(java.io.File file)
accept in class javax.swing.filechooser.FileFilterFileFilter.accept(java.io.File)public void setDescription(java.lang.String description)
description - the descriptionpublic java.lang.String getDescription()
getDescription in class javax.swing.filechooser.FileFilterFileFilter.getDescription()public void addExtension(java.lang.String extension)
extension - the extension to be added.public void addAnotherFilter(javax.swing.filechooser.FileFilter ff)
ff - the another filter.private boolean stringIsInExtensions(java.lang.String str)
str - the string
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||