Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| 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

## com.ibm.able.rules
Class AbleRsFileFilter

    java.lang.Object
      javax.swing.filechooser.FileFilter
          com.ibm.able.rules.AbleRsFileFilter

public class AbleRsFileFilter
extends javax.swing.filechooser.FileFilter

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

### AbleRsFileFilter

    public AbleRsFileFilter(java.lang.String[] theFilters,
                            java.lang.String theDescription)

  Creates a file filter from the given string array and description. Example: new AbleRsFileFilter(String {"rsf", "rsfxml"}, "Fuzzy ruleset source files");

  Note that the "." before the extension is not needed and will be ignored.

Parameters:
  `theFilters` - an array of strings represent file types on which to filter files.

See Also:
  `addExtension(java.lang.String)`

Method Detail

### accept

    public boolean accept(java.io.File theFile)

  Determine whether a file should be included in the dialog selection box.

  Note that files that begin with "." are ignored.

  Parameters:
    `theFile` - the file.

  Returns:
    true if the file should be displayed in the selection box, false otherwise.

### getDescription

    public java.lang.String getDescription()

### addExtension

    public void addExtension(java.lang.String theExtension)

  Add another extension to the list of filters. Note that the "." before the extension is not needed and will be ignored. Also, case is ignored.

  Parameters:
    `theExtension` - an extension on which to filter.

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| 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

(C) Copyright IBM Corporation 1999, 2005