Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ikayaki.gui.GenericFileFilter Class Reference

List of all members.

Public Member Functions

 GenericFileFilter (String description, String...extensions)
boolean accept (File pathname)
String getDescription ()

Static Private Member Functions

static String getExtension (File f)

Private Attributes

String[] extensions
String description

Detailed Description

A FileFilter for a FileChooser. Can be used to show only some file types, determined by extension.

Author:
Esko Luontola

Definition at line 33 of file GenericFileFilter.java.


Constructor & Destructor Documentation

ikayaki.gui.GenericFileFilter.GenericFileFilter String  description,
String...  extensions
 

Creates a new file filter for the specified file type. The file extensions can have "." prefixes or not.

Parameters:
description a description for the file type, or null to have no description.
extensions the file extensions that should be shown, or null to accept no extensions.

Definition at line 51 of file GenericFileFilter.java.

References ikayaki.gui.GenericFileFilter.extensions, and ikayaki.gui.null.


Member Function Documentation

boolean ikayaki.gui.GenericFileFilter.accept File  pathname  ) 
 

Tests whether or not the specified abstract pathname should be included in a pathname list.

Parameters:
pathname the abstract pathname to be tested.
Returns:
true if and only if pathname should be included.

Definition at line 83 of file GenericFileFilter.java.

References ikayaki.gui.GenericFileFilter.extensions, ikayaki.gui.GenericFileFilter.getExtension(), and ikayaki.gui.null.

Here is the call graph for this function:

String ikayaki.gui.GenericFileFilter.getDescription  ) 
 

Returns the file type description.

Definition at line 118 of file GenericFileFilter.java.

static String ikayaki.gui.GenericFileFilter.getExtension File  f  )  [static, private]
 

Returns the extension of the given file.

Parameters:
f the file which's extension is wanted
Returns:
the characters after the last dot in the file name

Definition at line 105 of file GenericFileFilter.java.

References ikayaki.gui.null.

Referenced by ikayaki.gui.GenericFileFilter.accept().


Member Data Documentation

String ikayaki.gui.GenericFileFilter.description [private]
 

File type desription for the extensions.

Definition at line 43 of file GenericFileFilter.java.

String [] ikayaki.gui.GenericFileFilter.extensions [private]
 

Extensions to be shown.

Definition at line 38 of file GenericFileFilter.java.

Referenced by ikayaki.gui.GenericFileFilter.accept(), and ikayaki.gui.GenericFileFilter.GenericFileFilter().


The documentation for this class was generated from the following file:
Generated on Fri May 6 16:00:51 2005 for Squid by  doxygen 1.4.1