JTP
Class LevelSetFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by JTP.LevelSetFilter

public class LevelSetFilter
extends FileFilter

Custom file filter for levelset open/save dialogs

Author:
V.Termanis

Constructor Summary
LevelSetFilter(String extension)
          Constructs a new LevelSetFilter with the given extension.
 
Method Summary
 boolean accept(File f)
          Determines whether a particular file is to be listed or not
 String getDescription()
          Provides description for this file filter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LevelSetFilter

public LevelSetFilter(String extension)
               throws NullPointerException
Constructs a new LevelSetFilter with the given extension.

Parameters:
extension - to filter by
Throws:
NullPointerException - if extension is null
Method Detail

accept

public boolean accept(File f)
Determines whether a particular file is to be listed or not

Specified by:
accept in class FileFilter
Parameters:
f - file to check
Returns:
true if the supplied file has a valid extension

getDescription

public String getDescription()
Provides description for this file filter

Specified by:
getDescription in class FileFilter
Returns:
description of this filter