ptolemy.actor.gui
Class TableauFrame.ExtensionFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by ptolemy.actor.gui.TableauFrame.ExtensionFileFilter
Enclosing class:
TableauFrame

public static class TableauFrame.ExtensionFileFilter
extends javax.swing.filechooser.FileFilter

File filter that filters out files that do not have one of a pre-specified list of extensions.


Field Summary
private  java.util.List _extensions
           
 
Constructor Summary
TableauFrame.ExtensionFileFilter(java.util.List extensions)
          Construct a file filter that filters out all files that do not have one of the extensions in the given list.
 
Method Summary
 boolean accept(java.io.File fileOrDirectory)
          Accept only files with one of the extensions given in the constructor.
 java.lang.String getDescription()
          The description of this filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_extensions

private java.util.List _extensions
Constructor Detail

TableauFrame.ExtensionFileFilter

public TableauFrame.ExtensionFileFilter(java.util.List extensions)
Construct a file filter that filters out all files that do not have one of the extensions in the given list.

Parameters:
extensions - A list of extensions, each of which is a String.
Method Detail

accept

public boolean accept(java.io.File fileOrDirectory)
Accept only files with one of the extensions given in the constructor.

Specified by:
accept in class javax.swing.filechooser.FileFilter
Parameters:
fileOrDirectory - The file to be checked.
Returns:
True if the file is a directory or has one of the specified extensions.

getDescription

public java.lang.String getDescription()
The description of this filter.

Specified by:
getDescription in class javax.swing.filechooser.FileFilter