Package ptolemy.gui
Class PtFilenameFilter
- java.lang.Object
-
- javax.swing.filechooser.FileFilter
-
- ptolemy.gui.PtFilenameFilter
-
- All Implemented Interfaces:
java.io.FilenameFilter
- Direct Known Subclasses:
ExtensionFilenameFilter
public class PtFilenameFilter extends javax.swing.filechooser.FileFilter implements java.io.FilenameFilterA file filter that determines what files are displayed by the file dialog.Note that the containing class can use either java.awt.FileDialog or javax.swing.JFileChooser, so classes should extend FilenameFilter, which can be used with either.
- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Christopher Brooks
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (cxh)
-
-
Constructor Summary
Constructors Constructor Description PtFilenameFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(java.io.File file)Return true if the file is acceptable.booleanaccept(java.io.File directory, java.lang.String name)Return true if the file is acceptable.java.lang.StringgetDescription()A description of this FilenameFilter.
-
-
-
Method Detail
-
accept
public boolean accept(java.io.File file)
Return true if the file is acceptable.- Specified by:
acceptin classjavax.swing.filechooser.FileFilter- Parameters:
file- The file to be checked.- Returns:
- true if the file is acceptable
-
accept
public boolean accept(java.io.File directory, java.lang.String name)Return true if the file is acceptable.- Specified by:
acceptin interfacejava.io.FilenameFilter- Parameters:
directory- The directory that contains the file.name- The name of the file.- Returns:
- true if the file is acceptable.
-
getDescription
public java.lang.String getDescription()
A description of this FilenameFilter.- Specified by:
getDescriptionin classjavax.swing.filechooser.FileFilter- Returns:
- In this base class, return the string "All Files".
-
-