y.io
Class SuffixFileFilter

java.lang.Object
  |
  +--javax.swing.filechooser.FileFilter
        |
        +--y.io.SuffixFileFilter

public class SuffixFileFilter
extends FileFilter

A file filter that accepts file names with a specific suffix.


Constructor Summary
SuffixFileFilter(String acceptingSuffix, String description)
          Creates a new instance of YFileFilter.
SuffixFileFilter(String acceptingSuffix, String description, boolean acceptDir)
          Creates a new instance of YFileFilter.
 
Method Summary
 boolean accept(File f)
           
 boolean equals(Object o)
           
 String getAcceptingSuffix()
           
 String getDescription()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SuffixFileFilter

public SuffixFileFilter(String acceptingSuffix,
                        String description)
Creates a new instance of YFileFilter. It accepts files and direcories by default.

Parameters:
acceptingSuffix - the suffix string for accepted file names.
description - a descriptive String for the accepted file format

SuffixFileFilter

public SuffixFileFilter(String acceptingSuffix,
                        String description,
                        boolean acceptDir)
Creates a new instance of YFileFilter.

Parameters:
acceptingSuffix - the suffix string for accepted file names.
description - a descriptive String for the accepted file format
acceptDir - whether or not this filter accepts directories
Method Detail

accept

public boolean accept(File f)
Specified by:
accept in class FileFilter

getAcceptingSuffix

public String getAcceptingSuffix()

getDescription

public String getDescription()
Specified by:
getDescription in class FileFilter

equals

public boolean equals(Object o)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

© Copyright 2000-2003,
yWorks GmbH.
All rights reserved.

2003