com.xinapse.multisliceimage.roi
Class ROIFileFilter

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

public class ROIFileFilter
extends javax.swing.filechooser.FileFilter

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


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

Field Detail

FILE_EXTENSION

public static final java.lang.String FILE_EXTENSION
The extension for ROI files (".roi").

See Also:
Constant Field Values
Constructor Detail

ROIFileFilter

public ROIFileFilter()
Constructor for ROIFileFilter.

Method Detail

getDescription

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

Specified by:
getDescription in class javax.swing.filechooser.FileFilter
Returns:
the description String "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.