Cytoscape 3.0.1 API

org.cytoscape.util.swing
Class FileChooserFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by org.cytoscape.util.swing.FileChooserFilter

public final class FileChooserFilter
extends FileFilter

Used to hold extension(s) of acceptable file types and a short description of them.


Cytoscape Backwards Compatibility (Final Class): This class is final and therefore can't be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.

Constructor Summary
FileChooserFilter(String description, String extension)
          Construct this FileChooserFilter using one acceptable file type extension.
FileChooserFilter(String description, String[] extensions)
          Construct this FileChooserFilter using multiple acceptable file type extensions.
 
Method Summary
 boolean accept(File file)
          Accept or not the file from JFileChooser.
 boolean equals(Object other)
           
 String getDescription()
          Returns the short description of the acceptable file type.
 String[] getExtensions()
          Returns an array of the extensions associated with this FileChooserFilter.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileChooserFilter

public FileChooserFilter(String description,
                         String extension)
Construct this FileChooserFilter using one acceptable file type extension.

Parameters:
description - a short description of the acceptable file type
extension - the file extension of the acceptable file type

FileChooserFilter

public FileChooserFilter(String description,
                         String[] extensions)
Construct this FileChooserFilter using multiple acceptable file type extensions.

Parameters:
description - a short description of the acceptable file type(s)
extensions - the file extensions of the acceptable file type(s)
Method Detail

accept

public boolean accept(File file)
Accept or not the file from JFileChooser.

Specified by:
accept in class FileFilter
Parameters:
file - the file to be tested

getDescription

public String getDescription()
Returns the short description of the acceptable file type.

Specified by:
getDescription in class FileFilter
Returns:
the short description of the acceptable file type.

getExtensions

public String[] getExtensions()
Returns an array of the extensions associated with this FileChooserFilter.

Returns:
an array of the extensions associated with this FileChooserFilter.

equals

public boolean equals(Object other)
Overrides:
equals in class Object

Cytoscape 3.0.1 API

Copyright 2011 Cytoscape Consortium. All rights reserved.