Back to index

wims  3.65+svn20090927
Public Member Functions
ptolemy.plot.PlotFrame.EPSFileFilter Class Reference

Display only .eps files. More...

Inheritance diagram for ptolemy.plot.PlotFrame.EPSFileFilter:
Inheritance graph
[legend]
Collaboration diagram for ptolemy.plot.PlotFrame.EPSFileFilter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

boolean accept (File fileOrDirectory)
 Accept only .eps files.
String getDescription ()
 The description of this filter.

Detailed Description

Display only .eps files.

Definition at line 627 of file PlotFrame.java.


Member Function Documentation

boolean ptolemy.plot.PlotFrame.EPSFileFilter.accept ( File  fileOrDirectory) [inline]

Accept only .eps files.

Parameters:
fileThe file to be checked.
Returns:
true if the file is a directory, a .eps file

Definition at line 632 of file PlotFrame.java.

                                                    {
            if (fileOrDirectory.isDirectory()) {
                return true;
            }

            String fileOrDirectoryName = fileOrDirectory.getName();
            int dotIndex = fileOrDirectoryName.lastIndexOf('.');

            if (dotIndex == -1) {
                return false;
            }

            String extension = fileOrDirectoryName.substring(dotIndex);

            if (extension != null) {
                if (extension.equalsIgnoreCase(".eps")) {
                    return true;
                } else {
                    return false;
                }
            }

            return false;
        }

The description of this filter.

Definition at line 658 of file PlotFrame.java.

                                       {
            return "Encapsulated PostScript (.eps) files";
        }

The documentation for this class was generated from the following file: