Package jmri.util
Class NoArchiveFileFilter
java.lang.Object
javax.swing.filechooser.FileFilter
jmri.util.NoArchiveFileFilter
File filter to suppress zip file archives.
Java 1.6's FileChooser gets slow when it encounters large zip files. This filter skips them, while still allowing you to specify others, etc.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a filter that excludes.zipand.jarfiles.NoArchiveFileFilter(String description) Create a filter that excludes.zipand.jarfiles.NoArchiveFileFilter(String description, String... extensions) Create a filter that filters for the specified extensions, excluding.zipand.jarfiles. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDo not display .zip or .jar files in file chooser.
-
Constructor Details
-
NoArchiveFileFilter
public NoArchiveFileFilter()Create a filter that excludes.zipand.jarfiles. -
NoArchiveFileFilter
Create a filter that excludes.zipand.jarfiles.- Parameters:
description- The filter description presented in a file chooser
-
NoArchiveFileFilter
Create a filter that filters for the specified extensions, excluding.zipand.jarfiles.- Parameters:
description- The filter description presented in a file chooserextensions- The extensions to accept; if no extensions are passed, all files except archives are accepted; to accept a limited set of extensions and files without an extension, include an empty String as an extension
-
-
Method Details
-
accept
Do not display .zip or .jar files in file chooser. Allows directories to be selected.- Specified by:
acceptin classFileFilter
-
getDescription
- Specified by:
getDescriptionin classFileFilter
-