|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectjavax.swing.filechooser.FileFilter
com.ibm.able.rules.AbleRsFileFilter
A convenience implementation of FileFilter that filters out all files except for those file extensions that it knows about. File extensions are of the type ".foo", which are typically found on OS/2, Unix, and windows boxes, but not on Macinthosh. Case is ignored. Example - create a new filter that filters out all files but "rs" and "frs" fuzzy rule files: JFileChooser chooser = new JFileChooser(); AbleRsFileFilter filter = new AbleRsFileFilter(new String{"rsf", "rsfxml"}) chooser.addChoosableFileFilter(filter); chooser.showOpenDialog(this);
| Constructor Summary | |
|---|---|
AbleRsFileFilter(java.lang.String[] theFilters,
java.lang.String theDescription)
Creates a file filter from the given string array and description. |
|
| Method Summary | |
|---|---|
boolean |
accept(java.io.File theFile)
Determine whether a file should be included in the dialog selection box. |
void |
addExtension(java.lang.String theExtension)
Add another extension to the list of filters. |
java.lang.String |
getDescription()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbleRsFileFilter(java.lang.String[] theFilters,
java.lang.String theDescription)
Note that the "." before the extension is not needed and will be ignored.
theFilters - an array of strings represent file types on which to
filter files.
addExtension(java.lang.String)| Method Detail |
public boolean accept(java.io.File theFile)
Note that files that begin with "." are ignored.
theFile - the file.
public java.lang.String getDescription()
public void addExtension(java.lang.String theExtension)
theExtension - an extension on which to filter.
|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||