SOA
© 2004 SoS Group
All Rights Reserved

sos.koa
Class FileNameFilter

java.lang.Object
  extended byjavax.swing.filechooser.FileFilter
      extended bysos.koa.FileNameFilter

public class FileNameFilter
extends javax.swing.filechooser.FileFilter

A file filter.

Version:
$Id: FileNameFilter.java,v 1.3 2004/05/04 19:51:51 martijno Exp $
Author:
Martijn Oostdijk (martijno@cs.kun.nl)

Field Summary
(package private)  java.lang.String description
          Description of files accepted by this filter.
(package private)  java.lang.String extension
          Allowed extension of files accepted by this filter.
 
Constructor Summary
FileNameFilter(java.lang.String extension, java.lang.String description)
          Constructs a filter which accepts files with extension extension.
 
Method Summary
 boolean accept(java.io.File file)
          Whether this filter accepts file.
 java.lang.String getDescription()
          Description of files accepted by this filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

extension

java.lang.String extension
Allowed extension of files accepted by this filter.


description

java.lang.String description
Description of files accepted by this filter.

Constructor Detail

FileNameFilter

public FileNameFilter(java.lang.String extension,
                      java.lang.String description)
Constructs a filter which accepts files with extension extension. These files are described by description.

Parameters:
extension - file extension.
description - file description.
Method Detail

accept

public boolean accept(java.io.File file)
Whether this filter accepts file.

Returns:
a boolean indicating whether this filter accepts file.

getDescription

public java.lang.String getDescription()
Description of files accepted by this filter.

Returns:
a description of files accepted by this filter.

SOA
© 2004 SoS Group
All Rights Reserved