|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.filechooser.FileFilter
com.pietschy.command.file.ExtensionFileFilter
public class ExtensionFileFilter
An implementation of FileFilter that is based on the extension of a file.
This filter is also capable of checking and adding the extension if it's missing. See
checkAndAddExtension(File).
checkAndAddExtension(File)| Constructor Summary | |
|---|---|
ExtensionFileFilter(java.lang.String extension,
java.lang.String description)
Creates a new filter for the specified file extension with that has the specified description. |
|
| Method Summary | |
|---|---|
boolean |
accept(java.io.File f)
Accepts files that end with the specified extension. |
java.io.File |
checkAndAddExtension(java.io.File file)
Checks that the specified file has an extension defined. |
java.lang.String |
getDescription()
Gets this filters description |
boolean |
isIgnoreCase()
Checks if this filter should ignore case |
void |
setIgnoreCase(boolean ignoreCase)
Configures this filter to ignore case. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExtensionFileFilter(java.lang.String extension,
java.lang.String description)
extension - the file extension to excluding the preceeding '.', ie "java", not ".java".description - the user friendly description of the file filter.| Method Detail |
|---|
public boolean accept(java.io.File f)
accept in class javax.swing.filechooser.FileFilterf - the file to check.
public java.lang.String getDescription()
getDescription in class javax.swing.filechooser.FileFilterpublic boolean isIgnoreCase()
true if this filter should ignore case, false otherwise.public void setIgnoreCase(boolean ignoreCase)
ignoreCase - true to ignore case, false otherwise.public java.io.File checkAndAddExtension(java.io.File file)
file - the file to check.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||