org.argouml.util
Class SuffixFilter
java.lang.Object
javax.swing.filechooser.FileFilter
org.argouml.util.SuffixFilter
- public class SuffixFilter
- extends FileFilter
This class handles file extensions.
suffix
private final String suffix
desc
private final String desc
SuffixFilter
public SuffixFilter(String s,
String d)
- The constructor.
- Parameters:
s - the suffix stringd - the file type description
accept
public boolean accept(File f)
- See Also:
FileFilter.accept(java.io.File)
getExtension
public static String getExtension(File f)
- Parameters:
f - the file to get the extension from
- Returns:
- the extension string (without the dot)
getExtension
public static String getExtension(String filename)
- Parameters:
filename - the name of the file to get the extension from
- Returns:
- the extension string (without the dot)
getDescription
public String getDescription()
- See Also:
FileFilter.getDescription()
getSuffix
public String getSuffix()
- Returns:
- Returns the _suffix.
toString
public String toString()
- Adding this function enables easy selection of suffixfilters
e.g. in a combobox.
- See Also:
Object.toString()