org.jhotdraw.gui.filechooser
Class ExtensionFileFilter
- java.lang.Object
-
- javax.swing.filechooser.FileFilter
-
- org.jhotdraw.gui.filechooser.ExtensionFileFilter
-
public class ExtensionFileFilter extends javax.swing.filechooser.FileFilterFilters files by their extensions.
-
-
Constructor Summary
Constructors Constructor and Description ExtensionFileFilter(java.lang.String description, java.lang.String extension)Creates a new instance.ExtensionFileFilter(java.lang.String description, java.lang.String[] extensions)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanaccept(java.io.File pathname)java.lang.StringgetDescription()java.util.Set<java.lang.String>getExtensions()Returns an unmodifiable set with the filename extensions.java.io.FilemakeAcceptable(java.io.File pathname)Appends the extension to the filename, in case it is missing.
-
-
-
Constructor Detail
-
ExtensionFileFilter
public ExtensionFileFilter(java.lang.String description, java.lang.String extension)Creates a new instance.- Parameters:
description- A human readable description.extension- The filename extension. This will be converted to lower-case by this method.
-
ExtensionFileFilter
public ExtensionFileFilter(java.lang.String description, java.lang.String[] extensions)Creates a new instance.- Parameters:
description- A human readable description.extensions- The filename extensions. These will be converted to lower-case by this method.
-
-
Method Detail
-
getExtensions
public java.util.Set<java.lang.String> getExtensions()
Returns an unmodifiable set with the filename extensions. All extensions are lower case.
-
accept
public boolean accept(java.io.File pathname)
- Specified by:
acceptin classjavax.swing.filechooser.FileFilter
-
makeAcceptable
public java.io.File makeAcceptable(java.io.File pathname)
Appends the extension to the filename, in case it is missing.
-
getDescription
public java.lang.String getDescription()
- Specified by:
getDescriptionin classjavax.swing.filechooser.FileFilter
-
-
DataMelt 3.0 © DataMelt by jWork.ORG