Package PamUtils
Class PamFileFilter
java.lang.Object
javax.swing.filechooser.FileFilter
PamUtils.PamFileFilter
- All Implemented Interfaces:
FileFilter
- Direct Known Subclasses:
PamAudioFileFilter
,PamAudioFileFilter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
void
addFilePrefix
(String prefix) Specify a prefix for the file filtervoid
addFileType
(String extString) static File
checkFileEnd
(File f, String end, boolean forceEnd) Checks a file end.static String
getExtension
(File f) static String
getFileExtension
(String file) Get all the file extensions.boolean
void
setAcceptFolders
(boolean acceptFolders)
-
Constructor Details
-
PamFileFilter
-
-
Method Details
-
addFileType
-
addFilePrefix
Specify a prefix for the file filter- Parameters:
prefix
-
-
accept
- Specified by:
accept
in interfaceFileFilter
- Specified by:
accept
in classFileFilter
-
getExtension
-
checkFileEnd
Checks a file end. If forceEnd is true, then the end must be of the same type as end, otherwise, it will allow any file end, but if none exists, will add the given default one.- Parameters:
f
- file to checkend
- file end (with or without the '.')forceEnd
- force it to add the end to the file name- Returns:
- File corrected file name.
-
getDescription
- Specified by:
getDescription
in classFileFilter
-
isAcceptFolders
public boolean isAcceptFolders() -
setAcceptFolders
public void setAcceptFolders(boolean acceptFolders) -
getFileExtension
-
getFileExtensions
Get all the file extensions.- Returns:
- the file extensions
-