ch.hearc.I04_05s08.GUI
Class SimpleFileFilter

java.lang.Object
  extended byjavax.swing.filechooser.FileFilter
      extended bych.hearc.I04_05s08.GUI.SimpleFileFilter

public class SimpleFileFilter
extends FileFilter

A file filter for file selector

Author:
Blanc, Yoan
Licence:
MIT
Copyright:
2005 Yoan Blanc, HE-ARC Ing�nierie

Field Summary
private  String description
          Description
private  String extension
          Extension
 
Constructor Summary
SimpleFileFilter()
          Build the filter
SimpleFileFilter(String description)
          Build filter
 
Method Summary
 boolean accept(File f)
           
 void addExtension(String extension)
          Add an extension
 String getDescription()
          Get the description of the filter
private  String getExtension(File f)
          Get the extension of a file
 void setDescription(String description)
          Set the description of the filter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

description

private String description
Description


extension

private String extension
Extension

Constructor Detail

SimpleFileFilter

public SimpleFileFilter(String description)
Build filter

Parameters:
description - the description of the filter

SimpleFileFilter

public SimpleFileFilter()
Build the filter

Method Detail

addExtension

public void addExtension(String extension)
Add an extension

Parameters:
extension -

accept

public boolean accept(File f)

setDescription

public void setDescription(String description)
Set the description of the filter

Parameters:
description - the description of the filter

getDescription

public String getDescription()
Get the description of the filter

Returns:
the description of the filter

getExtension

private String getExtension(File f)
Get the extension of a file

Parameters:
f - the file
Returns:
the extension


A project by Blanc, Yoan – supervised by Dr. Ghorbel, Hatem.
2004 © Blanc, Yoan - HE-ARC