public class Icons
extends java.lang.Object
This class maintains a missingList which stores failed accesses. This is to avoid accessing the file system repeatedly for a missing icon.
| Constructor and Description |
|---|
Icons() |
| Modifier and Type | Method and Description |
|---|---|
static javax.swing.Icon |
getIcon(IconKey key) |
static javax.swing.Icon |
getIcon(java.lang.String key)
Returns the requested icon by name.
|
static javax.swing.Icon |
getIcon(java.lang.String key,
boolean withWarning)
Returns the requested icon by name.
|
static java.awt.Image |
getImage(IconKey key) |
static java.awt.Image |
getImage(java.lang.String key)
Returns the requested image by name.
|
static void |
preloadAllIcons(IconKey[] iconKeys)
Preload the icons for all given
IconKeys into the icon cache and prints a warning if
the according icon resource was not found. |
static java.lang.String |
resourcePartNameOf(IconKey key) |
public static java.awt.Image getImage(IconKey key)
public static java.awt.Image getImage(java.lang.String key)
name must be a
pure name string or a relative pathname under the images subdirectory
and must not have any extension.public static javax.swing.Icon getIcon(java.lang.String key)
name must be a
pure name string or a relative pathname under the images subdirectory
and must not have any extension.public static javax.swing.Icon getIcon(java.lang.String key,
boolean withWarning)
name must be a
pure name string or a relative pathname under the images subdirectory
and must not have any extension.public static javax.swing.Icon getIcon(IconKey key)
public static java.lang.String resourcePartNameOf(IconKey key)
Copyright © 2014 EsprIT-Systems. All Rights Reserved.