TV-Browser 2.7.5 API

util.ui
Class ExtensionFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by util.ui.ExtensionFileFilter
All Implemented Interfaces:
FilenameFilter

public class ExtensionFileFilter
extends FileFilter
implements FilenameFilter

A file filter that allows to specify a set of extension for determining, whether a file should be shown.

Author:
Til Schneider, www.murfman.de

Field Summary
(package private)  String[] mExtenstionList
          The file extensions this filter should let pass.
(package private)  String mName
          The localized name for this filter.
 
Constructor Summary
ExtensionFileFilter(String[] extenstionList, String name)
          Creates a new instance of ExtensionFileFilter.
ExtensionFileFilter(String extension, String name)
          Creates a new instance of ExtensionFileFilter.
 
Method Summary
 boolean accept(File file)
          Returns whether this given File is accepted by this filter.
 boolean accept(File dir, String name)
          Returns whether this given File is accepted by this filter.
 String getDescription()
          Gets the localized name of this filter.
 String toString()
          Gets the localized name of this filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mExtenstionList

String[] mExtenstionList
The file extensions this filter should let pass.


mName

String mName
The localized name for this filter.

Constructor Detail

ExtensionFileFilter

public ExtensionFileFilter(String extension,
                           String name)
Creates a new instance of ExtensionFileFilter.

Parameters:
extension - The file extension this filter should let pass.
name - The localized name for this filter.

ExtensionFileFilter

public ExtensionFileFilter(String[] extenstionList,
                           String name)
Creates a new instance of ExtensionFileFilter.

Parameters:
extenstionList - The file extensions this filter should let pass.
name - The localized name for this filter.
Method Detail

toString

public String toString()
Gets the localized name of this filter.

Overrides:
toString in class Object
Returns:
the localized name of this filter.

accept

public boolean accept(File file)
Returns whether this given File is accepted by this filter.

Specified by:
accept in class FileFilter
Parameters:
file - The file to check.
Returns:
whether the specified file is accepted.

getDescription

public String getDescription()
Gets the localized name of this filter.

Specified by:
getDescription in class FileFilter
Returns:
the localized name of this filter.

accept

public boolean accept(File dir,
                      String name)
Returns whether this given File is accepted by this filter.

Specified by:
accept in interface FilenameFilter
Parameters:
dir - The directory of the file to check.
name - The name of the file to check.
Returns:
whether the specified file is accepted.

TV-Browser 2.7.5 API

TV-Browser 2.7.5, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)