com.xinapse.multisliceimage.Analyze
Class AnalyzeFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by com.xinapse.multisliceimage.Analyze.AnalyzeFileFilter

public class AnalyzeFileFilter
extends javax.swing.filechooser.FileFilter

A file filter for Analyze header files. The accept method returns true if the file name end with ".hdr" or ".HDR".


Constructor Summary
AnalyzeFileFilter()
          The constructor for an Analyze image header file filter.
 
Method Summary
 boolean accept(java.io.File file)
          Tests whether the given file probably represents an Analyze header file.
 java.lang.String getDescription()
          Returns "Analyze Images".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnalyzeFileFilter

public AnalyzeFileFilter()
The constructor for an Analyze image header file filter.

Method Detail

getDescription

public java.lang.String getDescription()
Returns "Analyze Images".

Specified by:
getDescription in class javax.swing.filechooser.FileFilter
Returns:
the description String "Analyze Images".

accept

public boolean accept(java.io.File file)
Tests whether the given file probably represents an Analyze header file. Tests whether the file name end with ".hdr" or ".HDR". Also passes directories to allow navigation while looking for Analyze images.

Specified by:
accept in class javax.swing.filechooser.FileFilter
Parameters:
file - the file to test.
Returns:
true if the supplied file is probably an Analyze header file or a directory. Returns false otherwise.


Copyright 2006-2008 Xinapse Systems Limited. All Rights Reserved.