Package PamUtils
Class PamFileFilter
java.lang.Object
javax.swing.filechooser.FileFilter
PamUtils.PamFileFilter
- All Implemented Interfaces:
 FileFilter
- Direct Known Subclasses:
 PamAudioFileFilter,PamAudioFileFilter
- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidaddFilePrefix(String prefix) Specify a prefix for the file filtervoidaddFileType(String extString) static FilecheckFileEnd(File f, String end, boolean forceEnd) Checks a file end.static StringgetExtension(File f) static StringgetFileExtension(String file) Get all the file extensions.booleanvoidsetAcceptFolders(boolean acceptFolders)  
- 
Field Details
- 
acceptFolders
protected boolean acceptFolders 
 - 
 - 
Constructor Details
- 
PamFileFilter
 
 - 
 - 
Method Details
- 
addFileType
 - 
addFilePrefix
Specify a prefix for the file filter- Parameters:
 prefix-
 - 
accept
- Specified by:
 acceptin interfaceFileFilter- Specified by:
 acceptin 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:
 getDescriptionin classFileFilter
 - 
isAcceptFolders
public boolean isAcceptFolders() - 
setAcceptFolders
public void setAcceptFolders(boolean acceptFolders)  - 
getFileExtension
 - 
getFileExtensions
Get all the file extensions.- Returns:
 - the file extensions
 
 
 -