|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.mucommander.ui.icon.CustomFileIconProvider
public class CustomFileIconProvider
This FileIconProvider returns icons from the
IconManager's custom file icon set, based on files' extension and type.
No caching is performed by this class as IconManager already takes care of this.
| Field Summary | |
|---|---|
static java.lang.String |
ARCHIVE_ICON_NAME
Icon for supported archives (browsable) |
static java.lang.String |
FILE_ICON_NAME
Default icon for files without a known extension |
static java.lang.String |
FOLDER_ICON_NAME
Icon for directories |
static java.lang.String |
MAC_OS_X_APP_ICON_NAME
Icon for Mac OS X's applications |
static java.lang.String |
NETWORK_ICON_NAME
Icon for the root of remote (non-local) locations |
static java.lang.String |
NOT_ACCESSIBLE_FILE
Icon for not accessible files (used for quick-lists) |
static java.lang.String |
PARENT_FOLDER_ICON_NAME
Icon for parent folder (..) |
static java.lang.String |
SYMLINK_ICON_NAME
Transparent icon symbolizing symlinks, painted over an existing icon |
| Constructor Summary | |
|---|---|
CustomFileIconProvider()
|
|
| Method Summary | |
|---|---|
javax.swing.Icon |
getFileIcon(AbstractFile file,
java.awt.Dimension preferredResolution)
Returns an icon for the given file, or null if it couldn't be retrieved, either because the
given file doesn't exist or for any other reason. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String FOLDER_ICON_NAME
public static final java.lang.String FILE_ICON_NAME
public static final java.lang.String ARCHIVE_ICON_NAME
public static final java.lang.String PARENT_FOLDER_ICON_NAME
public static final java.lang.String SYMLINK_ICON_NAME
public static final java.lang.String MAC_OS_X_APP_ICON_NAME
public static final java.lang.String NETWORK_ICON_NAME
public static final java.lang.String NOT_ACCESSIBLE_FILE
| Constructor Detail |
|---|
public CustomFileIconProvider()
| Method Detail |
|---|
public javax.swing.Icon getFileIcon(AbstractFile file,
java.awt.Dimension preferredResolution)
FileIconProvidernull if it couldn't be retrieved, either because the
given file doesn't exist or for any other reason.
The specified Dimension is used as a hint at the preferred icon's resolution; there is
absolutely no guarantee that the returned Icon will indeed have this resolution. This dimension is
only used to choose between different resolutions should more than one resolution be available, and return the
one that most closely matches the specified one.
The implementation is not expected to perform any rescaling (either up or down), this method should only return
icons in their 'native' resolutions, using the preferred resolution to choose between different native dimensions.
For example, if this provider is able to create icons both in 16x16 and 32x32 resolutions, and a 48x48 resolution
is preferred, the 32x32 resolution should be favored as it is closer to 32x32.
getFileIcon in interface FileIconProviderfile - the AbstractFile instance for which an icon is requestedpreferredResolution - the preferred icon resolution
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard