edu.iu.iv.search.p2p.can
Class XmlFileFilter

java.lang.Object
  |
  +--javax.swing.filechooser.FileFilter
        |
        +--edu.iu.iv.search.p2p.can.XmlFileFilter

public class XmlFileFilter
extends javax.swing.filechooser.FileFilter

XML File Filter

Author:
Hardik Sheth (hsheth@indiana.edu)

Constructor Summary
XmlFileFilter()
          Creates a file filter.
 
Method Summary
 boolean accept(java.io.File f)
          Return true if this file should be shown in the directory pane, false if it shouldn't.
 void addExtension(java.lang.String extension)
          Adds a filetype "dot" extension to filter against.
 java.lang.String getDescription()
          Returns the human readable description of this filter.
 java.lang.String getExtension(java.io.File f)
          Return the extension portion of the file's name .
 void setDescription(java.lang.String description)
          Sets the human readable description of this filter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlFileFilter

public XmlFileFilter()
Creates a file filter. XML files are accepted.

See Also:
addExtension(java.lang.String)
Method Detail

accept

public boolean accept(java.io.File f)
Return true if this file should be shown in the directory pane, false if it shouldn't. Files that begin with "." are ignored.

Specified by:
accept in class javax.swing.filechooser.FileFilter
See Also:
getExtension(java.io.File), FileFilter#accepts

getExtension

public java.lang.String getExtension(java.io.File f)
Return the extension portion of the file's name .

See Also:
getExtension(java.io.File), FileFilter.accept(java.io.File)

addExtension

public void addExtension(java.lang.String extension)
Adds a filetype "dot" extension to filter against. Note that the "." before the extension is not needed and will be ignored.


getDescription

public java.lang.String getDescription()
Returns the human readable description of this filter.

Specified by:
getDescription in class javax.swing.filechooser.FileFilter
See Also:
setDescription, FileFilter.getDescription()

setDescription

public void setDescription(java.lang.String description)
Sets the human readable description of this filter.

See Also:
setDescription