j3d.org Code

org.j3d.ui
Class LoaderFileFilter

java.lang.Object
  extended byjavax.swing.filechooser.FileFilter
      extended byorg.j3d.ui.LoaderFileFilter

public class LoaderFileFilter
extends javax.swing.filechooser.FileFilter

A file filter implementation so that you can grab files of the types that correspond to the loaders available on the system.

The class takes information from the filter and builds filtering information from that. It does not maintain a reference to the descriptor. The filter will accept matching files and also all directories so that you can navigate the directory structure.

Version:
$Revision: 1.3 $
Author:
Justin Couch

Constructor Summary
LoaderFileFilter(FileLoaderDescriptor fld)
          Construct an instance of the filter based on the given device description.
 
Method Summary
 boolean accept(java.io.File f)
          Decide whether to accept this file based on the filter type.
 java.lang.String getDescription()
          Return a description string of the this filter (The file type) supported by this filter.
 FileLoaderDescriptor getDescriptor()
          Get the descriptor used by this file filter so that we can ask for the needed loader later on.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoaderFileFilter

public LoaderFileFilter(FileLoaderDescriptor fld)
Construct an instance of the filter based on the given device description.

Parameters:
fld - The file loader description to base the filter on
Method Detail

accept

public boolean accept(java.io.File f)
Decide whether to accept this file based on the filter type.

Parameters:
f - The file to test for suitability
Returns:
true if the file passes the filter

getDescription

public java.lang.String getDescription()
Return a description string of the this filter (The file type) supported by this filter.

Returns:
a String describing this filter

getDescriptor

public FileLoaderDescriptor getDescriptor()
Get the descriptor used by this file filter so that we can ask for the needed loader later on.

Returns:
The descriptor this represents

j3d.org Code

Latest Info from http://code.j3d.org/
Copyright © 2001 - j3d.org