|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.filechooser.FileFilter
org.pietschy.command.file.ExtensionFileFilter
public class ExtensionFileFilter
An implementation of FileFilter
that is based on the extension of a 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()
|
boolean |
isIgnoreCase()
|
void |
setIgnoreCase(boolean ignoreCase)
|
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.FileFilter
f
- the file to check.
public java.lang.String getDescription()
getDescription
in class javax.swing.filechooser.FileFilter
public boolean isIgnoreCase()
public void setIgnoreCase(boolean ignoreCase)
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 |