JAPI 0_6-alpha-2
Yet another Java API
API Documentation

net.sf.japi.swing
Class FilenameFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by net.sf.japi.swing.FilenameFileFilter

public final class FilenameFileFilter
extends FileFilter

Swing FileFilter implementation that filters files with specified names.

Author:
Christian Hujer
Todo:
find a convenient way for i18n/l10n of this class

Constructor Summary
FilenameFileFilter(boolean acceptDirectories, boolean negate, String description, String... names)
          Create a DFileFilter.
FilenameFileFilter(boolean acceptDirectories, String description, String... names)
          Create a DFileFilter.
 
Method Summary
 boolean accept(File file)
          
 String getDescription()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilenameFileFilter

public FilenameFileFilter(boolean acceptDirectories,
                          String description,
                          String... names)
Create a DFileFilter. negate is set to false on this file filter.

Parameters:
acceptDirectories - pass true if this FileFilter should accept directories as well, false to deny directories
description - The description to use for swing
names - The names to accept

FilenameFileFilter

public FilenameFileFilter(boolean acceptDirectories,
                          boolean negate,
                          String description,
                          String... names)
Create a DFileFilter.

Parameters:
acceptDirectories - pass true if this FileFilter should accept directories as well, false to deny directories
negate - pass true if the names are to be negated, which means the filter will only accept files not names on one of the names; usually you want to pass false
description - The description to use for swing
names - The names to accept
Method Detail

getDescription

public String getDescription()

Specified by:
getDescription in class FileFilter

accept

public boolean accept(File file)

Specified by:
accept in class FileFilter

JAPI
Yet another Java API
API Documentation

© 2005-2006 Christian Hujer. All rights reserved. See copyright