Class DefaultFileFilter
java.lang.Object
javax.swing.filechooser.FileFilter
de.uni_trier.wi2.procake.gui.objecteditor.nestworkfloweditor.editor.DefaultFileFilter
Filter for use in a
JFileChooser.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classUtility file filter to accept editor files, namely .xml and .xml.gz extensions.static classUtility file filter to accept all image formats supported by image io. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultFileFilter(String extension, String description) Constructs a new filter for the specified extension and descpription. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true iffileis a directory or ends withext.Returns the description for accepted files.Returns the extension for accepted files.voidsetExtension(String extension) Sets the extension for accepted files.
-
Field Details
-
ext
Extension of accepted files. -
desc
Description of accepted files.
-
-
Constructor Details
-
DefaultFileFilter
Constructs a new filter for the specified extension and descpription.- Parameters:
extension- The extension to accept files with.description- The description of the file format.
-
-
Method Details
-
accept
Returns true iffileis a directory or ends withext.- Specified by:
acceptin classFileFilter- Parameters:
file- The file to be checked.- Returns:
- Returns true if the file is accepted.
-
getDescription
Returns the description for accepted files.- Specified by:
getDescriptionin classFileFilter- Returns:
- Returns the description.
-
getExtension
Returns the extension for accepted files.- Returns:
- Returns the extension.
-
setExtension
Sets the extension for accepted files.- Parameters:
extension- The extension to set.
-