java.lang.Object
javafx.stage.FileChooser.ExtensionFilter
- Enclosing class:
FileChooser
Defines an extension filter, used for filtering which files can be chosen
in a FileDialog based on the file name extensions.
- Since:
- JavaFX 2.0
-
Constructor Summary
ConstructorDescriptionExtensionFilter
(String description, String... extensions) Creates anExtensionFilter
with the specified description and the file name extensions.ExtensionFilter
(String description, List<String> extensions) Creates anExtensionFilter
with the specified description and the file name extensions. -
Method Summary
Modifier and TypeMethodDescriptionGets the description for thisExtensionFilter
.Gets the file name extensions for thisExtensionFilter
.
-
Constructor Details
-
ExtensionFilter
Creates anExtensionFilter
with the specified description and the file name extensions.File name extension should be specified in the
*.<extension>
format.- Parameters:
description
- the textual description for the filterextensions
- the accepted file name extensions- Throws:
NullPointerException
- if the description or the extensions arenull
IllegalArgumentException
- if the description or the extensions are empty
-
ExtensionFilter
Creates anExtensionFilter
with the specified description and the file name extensions.File name extension should be specified in the
*.<extension>
format.- Parameters:
description
- the textual description for the filterextensions
- the accepted file name extensions- Throws:
NullPointerException
- if the description or the extensions arenull
IllegalArgumentException
- if the description or the extensions are empty
-
-
Method Details
-
getDescription
Gets the description for thisExtensionFilter
.- Returns:
- the description
-
getExtensions
Gets the file name extensions for thisExtensionFilter
.The returned list is unmodifiable and will throw
UnsupportedOperationException
on each modification attempt.- Returns:
- the file name extensions
-