javazoom.jlgui.player.amp.util
Class FileNameFilter
javax.swing.filechooser.FileFilter
javazoom.jlgui.player.amp.util.FileNameFilter
- java.io.FileFilter
public class FileNameFilter
extends javax.swing.filechooser.FileFilter
implements java.io.FileFilter
FileName filter that works for both javax.swing.filechooser and java.io.
FileNameFilter(String ext, String description) - Constructs the list of extensions out of a string of comma-separated
elements, each of which represents one extension.
|
FileNameFilter(String ext, String description, boolean allowDir)
|
allowDir
protected boolean allowDir
default_extension
protected String default_extension
description
protected String description
extensions
protected java.util.List extensions
FileNameFilter
public FileNameFilter(String ext,
String description)
Constructs the list of extensions out of a string of comma-separated
elements, each of which represents one extension.
ext
- the list of comma-separated extensions
FileNameFilter
public FileNameFilter(String ext,
String description,
boolean allowDir)
accept
public boolean accept(File dir)
determines if the filename is an acceptable one. If a
filename ends with one of the extensions the filter was
initialized with, then the function returns true. if not,
the function returns false.
dir
- the directory the file is in
- true if the filename has a valid extension, false otherwise
getDefaultExtension
public String getDefaultExtension()
Returns the default extension.
getDescription
public String getDescription()
setDefaultExtension
public void setDefaultExtension(String ext)
JavaZOOM 1999-2006