Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.eireneh.swing
Class ExtensionFileFilter  view ExtensionFileFilter download ExtensionFileFilter.java

java.lang.Object
  extended byjavax.swing.filechooser.FileFilter
      extended bycom.eireneh.swing.ExtensionFileFilter

public class ExtensionFileFilter
extends javax.swing.filechooser.FileFilter

ExtensionFileFilter.
Distribution Licence:
Project B is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
The License is available on the internet here, by writing to Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, Or locally at the Licence link below.
The copyright to this program is held by it's authors.

Version:
D0.I0.T0

Field Summary
private  java.lang.String desc
          The description of this filter
private  java.lang.String[] extensions
          The allowed files
 
Constructor Summary
ExtensionFileFilter(java.lang.String[] extensions)
          Basic constructor
ExtensionFileFilter(java.lang.String[] extensions, java.lang.String desc)
          Basic constructor
 
Method Summary
 boolean accept(java.io.File file)
          Is the given file valid?
 java.lang.String getDescription()
          Returns a description of the files that will be selected by the filter (for example, "Java source files").
static java.lang.String getExtension(java.io.File file)
          Get the extension of a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

desc

private java.lang.String desc
The description of this filter


extensions

private java.lang.String[] extensions
The allowed files

Constructor Detail

ExtensionFileFilter

public ExtensionFileFilter(java.lang.String[] extensions)
Basic constructor


ExtensionFileFilter

public ExtensionFileFilter(java.lang.String[] extensions,
                           java.lang.String desc)
Basic constructor

Method Detail

accept

public boolean accept(java.io.File file)
Is the given file valid?


getDescription

public java.lang.String getDescription()
Description copied from class: javax.swing.filechooser.FileFilter
Returns a description of the files that will be selected by the filter (for example, "Java source files"). This description will usually be displayed on the javax.swing.JFileChooser component, often in a combo box that is used to select the appropriate filter (in cases where more than one filter is available).


getExtension

public static java.lang.String getExtension(java.io.File file)
Get the extension of a file.