public class ExtensionFileFilter
extends javax.swing.filechooser.FileFilter
implements java.io.FilenameFilter
Constructor and Description |
---|
ExtensionFileFilter(java.lang.String[] extenstionList,
java.lang.String name)
Creates a new instance of ExtensionFileFilter.
|
ExtensionFileFilter(java.lang.String extension,
java.lang.String name)
Creates a new instance of ExtensionFileFilter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.io.File file)
Returns whether this given File is accepted by this filter.
|
boolean |
accept(java.io.File dir,
java.lang.String name)
Returns whether this given File is accepted by this filter.
|
java.lang.String |
getDescription()
Gets the localized name of this filter.
|
java.lang.String |
getExtension() |
java.lang.String |
toString()
Gets the localized name of this filter.
|
public ExtensionFileFilter(java.lang.String extension, java.lang.String name)
extension
- The file extension this filter should let pass.name
- The localized name for this filter.public ExtensionFileFilter(java.lang.String[] extenstionList, java.lang.String name)
extenstionList
- The file extensions this filter should let pass.name
- The localized name for this filter.public java.lang.String toString()
toString
in class java.lang.Object
public boolean accept(java.io.File file)
accept
in class javax.swing.filechooser.FileFilter
file
- The file to check.public java.lang.String getDescription()
getDescription
in class javax.swing.filechooser.FileFilter
public boolean accept(java.io.File dir, java.lang.String name)
accept
in interface java.io.FilenameFilter
dir
- The directory of the file to check.name
- The name of the file to check.public java.lang.String getExtension()
TV-Browser 3.4.1.0, Copyright (C) 2004-2008 TV-Browser Team (dev@tvbrowser.org)