com.xinapse.multisliceimage.roi
Class ImageJROIFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by com.xinapse.multisliceimage.roi.ImageJROIFileFilter

public class ImageJROIFileFilter
extends javax.swing.filechooser.FileFilter

A FileFilter for ImageJ region of interest files. The accept() method returns true for files ending in ".roi" or ".zip" and for directories.


Field Summary
static java.lang.String ZIP_FILE_EXTENSION
          The extension for ZIP ROI files (".zip").
 
Constructor Summary
ImageJROIFileFilter()
          Constructor for ImageJROIFileFilter.
 
Method Summary
 boolean accept(java.io.File f)
          Tests whether the given file is a region of interest file.
 java.lang.String getDescription()
          Returns "ImageJ Region of Interest Files".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ZIP_FILE_EXTENSION

public static final java.lang.String ZIP_FILE_EXTENSION
The extension for ZIP ROI files (".zip").

See Also:
Constant Field Values
Constructor Detail

ImageJROIFileFilter

public ImageJROIFileFilter()
Constructor for ImageJROIFileFilter.

Method Detail

getDescription

public java.lang.String getDescription()
Returns "ImageJ Region of Interest Files".

Specified by:
getDescription in class javax.swing.filechooser.FileFilter
Returns:
the description String "ImageJ Region of Interest Files".

accept

public boolean accept(java.io.File f)
Tests whether the given file is a region of interest file. Also passes directories to allow navigation while looking for ROI files.

Specified by:
accept in class javax.swing.filechooser.FileFilter
Parameters:
f - the file to test.
Returns:
true if the supplied file is an roi file (ends with ".roi"), or a directory; returns false otherwise. The test is case-insensitive.


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