public final class FileChooserFilter extends FileFilter
Module: swing-util-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>swing-util-api</artifactId> </dependency>
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public FileChooserFilter(String description, String extension)
description
- a short description of the acceptable file typeextension
- the file extension of the acceptable file typepublic FileChooserFilter(String description, String[] extensions)
description
- a short description of the acceptable file type(s)extensions
- the file extensions of the acceptable file type(s)public boolean accept(File file)
accept
in class FileFilter
file
- the file to be testedpublic String getDescription()
getDescription
in class FileFilter
public String[] getExtensions()
Copyright 2011-2015 Cytoscape Consortium. All rights reserved.