protected class BasicFileChooserUI.BasicFileView extends FileView
Modifier and Type | Field and Description |
---|---|
protected Hashtable<File,Icon> |
iconCache
The icon cache
|
Constructor and Description |
---|
BasicFileView()
Constructs a
BasicFileView . |
Modifier and Type | Method and Description |
---|---|
void |
cacheIcon(File f,
Icon i)
Caches an icon for a file.
|
void |
clearIconCache()
Clears the icon cache.
|
Icon |
getCachedIcon(File f)
Returns the cached icon for the file.
|
String |
getDescription(File f)
A human readable description of the file.
|
Icon |
getIcon(File f)
The icon that represents this file in the
JFileChooser . |
String |
getName(File f)
The name of the file.
|
String |
getTypeDescription(File f)
A human readable description of the type of the file.
|
Boolean |
isHidden(File f)
Returns whether or not a file is hidden.
|
isTraversable
public void clearIconCache()
public String getName(File f)
f.getName()
.public String getDescription(File f)
getDescription
in class FileView
f
- a File
objectString
containing a description of the file or
null
if it is not available.public String getTypeDescription(File f)
jpg
file might have a type description of:
"A JPEG Compressed Image File"getTypeDescription
in class FileView
f
- a File
objectString
containing a description of the type of the file
or null
if it is not available .public Icon getCachedIcon(File f)
f
- the filepublic void cacheIcon(File f, Icon i)
f
- the filei
- the icon Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2016, Oracle and/or its affiliates. All rights reserved.
DRAFT 9-internal+0-2016-01-26-133437.ivan.openjdk9onspinwait