com.xinapse.multisliceimage.UNC
Class UNCFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by com.xinapse.multisliceimage.UNC.UNCFileFilter

public class UNCFileFilter
extends javax.swing.filechooser.FileFilter

A file filter for UNC images. The accept method returns true if the file starts with the UNC Magic Number.


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

Constructor Detail

UNCFileFilter

public UNCFileFilter()
The constructor for a UNC image file filter.

Method Detail

getDescription

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

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

accept

public boolean accept(java.io.File file)
Tests whether the given file probably represents a UNC image file. Tests whether the file starts with the UNC Magic Number. Also passes directories to allow navigation while looking for UNC images.

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


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