|
JHotDraw 7.0.9 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.filechooser.FileFilter
org.jhotdraw.io.ExtensionFileFilter
public class ExtensionFileFilter
Filters files by their extensions.
Constructor Summary | |
---|---|
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 | |
---|---|
boolean |
accept(java.io.File pathname)
|
java.lang.String |
getDescription()
|
java.util.Set<java.lang.String> |
getExtensions()
Returns an unmodifiable set with the filename extensions. |
java.io.File |
makeAcceptable(java.io.File pathname)
Appends the extension to the filename, in case it is missing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExtensionFileFilter(java.lang.String description, java.lang.String extension)
description
- A human readable description.extension
- The filename extension. This will be converted to
lower-case by this method.public ExtensionFileFilter(java.lang.String description, java.lang.String[] extensions)
description
- A human readable description.extensions
- The filename extensions. These will be converted to
lower-case by this method.Method Detail |
---|
public java.util.Set<java.lang.String> getExtensions()
public boolean accept(java.io.File pathname)
accept
in class javax.swing.filechooser.FileFilter
public java.io.File makeAcceptable(java.io.File pathname)
public java.lang.String getDescription()
getDescription
in class javax.swing.filechooser.FileFilter
|
Copyright 1996-2007 (c) JHotDraw.org. Some rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |