Class FWFileExtensionFilter
java.lang.Object
javax.swing.filechooser.FileFilter
net.simplace.pipe.formcomponents.file.FWFileExtensionFilter
Simple File Filter implementation that allows to restrict FileChoosers to certain file types
- Author:
- ckunze
-
Constructor Summary
ConstructorDescriptionCreates a FileExtensionFilter that initially allows all extensionsFWFileExtensionFilter
(String aExtension) Creates a FileExtensionFilter that initally allows a single file extensionFWFileExtensionFilter
(String aExtension, String aDescription) Creates a FileExtensionFilter that initally allows a single file extension -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
addExtension
(String aExtension) Adds a file extension to the list of accepted extensionsvoid
setDescription
(String aDescription) Sets the description of the file types that this filter accepts
-
Constructor Details
-
FWFileExtensionFilter
Creates a FileExtensionFilter that initally allows a single file extension- Parameters:
aExtension
- File extension to be allowed (i.e. "jpg")
-
FWFileExtensionFilter
Creates a FileExtensionFilter that initally allows a single file extension- Parameters:
aExtension
- File extension to be allowed (i.e. "jpg")aDescription
- Description of the file types that this filter accepts
-
FWFileExtensionFilter
public FWFileExtensionFilter()Creates a FileExtensionFilter that initially allows all extensions
-
-
Method Details
-
addExtension
Adds a file extension to the list of accepted extensions- Parameters:
aExtension
- File extension to be accepted (i.e. "jpg")
-
accept
- Specified by:
accept
in classFileFilter
-
setDescription
Sets the description of the file types that this filter accepts- Parameters:
aDescription
-
-
getDescription
- Specified by:
getDescription
in classFileFilter
-