- java.lang.Object
-
- javax.swing.filechooser.FileView
-
- javax.swing.plaf.basic.BasicFileChooserUI.BasicFileView
-
- Enclosing class:
- BasicFileChooserUI
protected class BasicFileChooserUI.BasicFileView extends FileView
A basic file view.
-
-
Constructor Summary
Constructors Constructor Description BasicFileView()Constructs aBasicFileView.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcacheIcon(File f, Icon i)Caches an icon for a file.voidclearIconCache()Clears the icon cache.IcongetCachedIcon(File f)Returns the cached icon for the file.StringgetDescription(File f)A human readable description of the file.IcongetIcon(File f)The icon that represents this file in theJFileChooser.StringgetName(File f)The name of the file.StringgetTypeDescription(File f)A human readable description of the type of the file.BooleanisHidden(File f)Returns whether or not a file is hidden.-
Methods inherited from class javax.swing.filechooser.FileView
isTraversable
-
-
-
-
Method Detail
-
clearIconCache
public void clearIconCache()
Clears the icon cache.
-
getName
public String getName(File f)
The name of the file. Normally this would be simplyf.getName().
-
getDescription
public String getDescription(File f)
A human readable description of the file. For example, a file named jag.jpg might have a description that read: "A JPEG image file of James Gosling's face".- Overrides:
getDescriptionin classFileView- Parameters:
f- aFileobject- Returns:
- a
Stringcontaining a description of the file ornullif it is not available.
-
getTypeDescription
public String getTypeDescription(File f)
A human readable description of the type of the file. For example, ajpgfile might have a type description of: "A JPEG Compressed Image File"- Overrides:
getTypeDescriptionin classFileView- Parameters:
f- aFileobject- Returns:
- a
Stringcontaining a description of the type of the file ornullif it is not available .
-
getCachedIcon
public Icon getCachedIcon(File f)
Returns the cached icon for the file.- Parameters:
f- the file- Returns:
- the cached icon for the file
-
cacheIcon
public void cacheIcon(File f, Icon i)
Caches an icon for a file.- Parameters:
f- the filei- the icon
-
-