Get Bounce at SourceForge.net. Fast secure and Free Open Source software downloads

org.bounce
Class DefaultFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by org.bounce.DefaultFileFilter

public class DefaultFileFilter
extends javax.swing.filechooser.FileFilter

The default file filter, allows for setting a description and a file-type extension.

Version:
$Revision: 1.6 $, $Date: 2008/01/28 21:28:37 $
Author:
Edwin Dankert

Constructor Summary
DefaultFileFilter(java.lang.String extensions, java.lang.String description)
          Creates a file filter that accepts the given file types.
 
Method Summary
 boolean accept(java.io.File file)
           
 void addExtension(java.lang.String extension)
          Add an extension to the list of extensions.
 java.lang.String getDescription()
           
 void setExtensions(java.lang.String extensions)
          Sets all possible extensions for this filter, divided by any of the following tokens " \t\n\r\f;,.:".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFileFilter

public DefaultFileFilter(java.lang.String extensions,
                         java.lang.String description)
Creates a file filter that accepts the given file types. The extensions should be divided by any of the following tokens " \t\n\r\f;,.:".

Parameters:
extensions - the extensions for the file-type.
description - the description of the file-type.
Method Detail

addExtension

public void addExtension(java.lang.String extension)
Add an extension to the list of extensions.

Parameters:
extension - the extension for the file-type without the '.'.

setExtensions

public void setExtensions(java.lang.String extensions)
Sets all possible extensions for this filter, divided by any of the following tokens " \t\n\r\f;,.:".

Parameters:
extensions - the extensions for the file-type.

accept

public boolean accept(java.io.File file)
Specified by:
accept in class javax.swing.filechooser.FileFilter

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in class javax.swing.filechooser.FileFilter

Get Bounce at SourceForge.net. Fast secure and Free Open Source software downloads

Copyright 2002-2002-2009 Edwin Dankert. All Rights Reserved.