ui.util
Class FileExtensionFilter
java.lang.Object
javax.swing.filechooser.FileFilter
ui.util.FileExtensionFilter
- All Implemented Interfaces:
- java.io.FilenameFilter
public class FileExtensionFilter
- extends javax.swing.filechooser.FileFilter
- implements java.io.FilenameFilter
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileExtensionFilter
public FileExtensionFilter(java.lang.String extension)
- Parameters:
extension
- The file's extension;
FileExtensionFilter
public FileExtensionFilter(java.lang.String extension,
java.lang.String description)
- Parameters:
extension
- The file's extension;description
- The file extension's description.
accept
public boolean accept(java.io.File file,
java.lang.String extension)
- Specified by:
accept
in interface java.io.FilenameFilter
validExtension
public boolean validExtension(java.lang.String extension)
getExtension
public java.lang.String getExtension()
- Returns:
- Returns the extension.
getDottedExtension
public java.lang.String getDottedExtension()
- This method just adds a DOT to the extension and returns it.
- Returns:
- Returns the dotted extension, eg. ".jpeg" or ".xml".
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
setDescription
public void setDescription(java.lang.String description)
- Parameters:
description
- The description to set.
Copyright © 2006 SF.net. All Rights Reserved.