Graphics2D Actor API

g2d.swing
Class IOPFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by g2d.swing.IOPFileFilter

public class IOPFileFilter
extends FileFilter

Subclass of FileFilter to allow custom filters for file choosers.

Author:
linda
See Also:
FileFilter, JFileChooser

Constructor Summary
IOPFileFilter()
           
IOPFileFilter(String description)
           
 
Method Summary
 boolean accept(File f)
          methods of abstract super class
 void addExtension(String extension)
          Adds given extension to list of accepted extensions.
 String getDescription()
           
 void removeExtension(String extension)
          Removes given extenstion (in lower case) from list of accepted extensions.
 void setDescription(String description)
          Sets new 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

IOPFileFilter

public IOPFileFilter()

IOPFileFilter

public IOPFileFilter(String description)
Method Detail

setDescription

public void setDescription(String description)
Sets new description for this file filter. If null is given, description will be empty string.

Parameters:
description - String used as description for this filter

addExtension

public void addExtension(String extension)
Adds given extension to list of accepted extensions. Given extension must not be null. Extension will be saved in lower case.

Parameters:
extension - String to denote extension of files accepted by this filter

removeExtension

public void removeExtension(String extension)
Removes given extenstion (in lower case) from list of accepted extensions.

Parameters:
extension - String to denotes extension of files no longer accepted by this filter

accept

public boolean accept(File f)
methods of abstract super class

Specified by:
accept in class FileFilter

getDescription

public String getDescription()
Specified by:
getDescription in class FileFilter

Graphics2D Actor API