public class ResourceIcons
extends java.lang.Object
ImageIcon
instances from resources. The returned image icons
are cached.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APP_ICON
Application icon definitions (icon-dir).
|
static java.lang.String |
AUTO_RUN_SMALL_ICON |
static java.lang.String |
CLOSE_TAB_SMALL_ICON |
static java.lang.String |
DEFAULT_ICON
The default map icon to use if no icon can be created.
|
static java.lang.String |
DEFAULT_PREVIEW
The default map preview to use if no icon can be created.
|
static java.lang.String |
FILTER_SMALL_ICON |
static java.lang.String |
RUN_PLUGIN_SMALL_ICON |
static java.lang.String |
SQUARE_CURSOR |
static java.lang.String |
SQUARE_EMPTY |
static java.lang.String |
SQUARE_NO_ARCH |
static java.lang.String |
SQUARE_NO_FACE |
static java.lang.String |
SQUARE_PRE_SELECTED_SQUARE |
static java.lang.String |
SQUARE_SELECTED_SQUARE |
static java.lang.String |
SQUARE_SELECTED_SQUARE_EAST |
static java.lang.String |
SQUARE_SELECTED_SQUARE_NORTH |
static java.lang.String |
SQUARE_SELECTED_SQUARE_SOUTH |
static java.lang.String |
SQUARE_SELECTED_SQUARE_WEST |
static java.lang.String |
SQUARE_UNKNOWN |
static java.lang.String |
SQUARE_WARNING |
static java.lang.String |
SYSTEM_DIR
The directory that contains the system icons.
|
static java.lang.String |
TREASURE_LIST |
static java.lang.String |
TREASURE_NO |
static java.lang.String |
TREASURE_YES |
static java.lang.String |
TREASUREONE_LIST |
Constructor and Description |
---|
ResourceIcons() |
Modifier and Type | Method and Description |
---|---|
void |
addToCache(java.lang.String name,
javax.swing.ImageIcon imageIcon)
Add an image to the cache.
|
javax.swing.ImageIcon |
getLightSquareIcon()
Returns the
ImageIcon for highlighting map squares that are
affected by nearby light emitting game objects. |
javax.swing.ImageIcon |
getResourceIcon(java.lang.String iconName)
Returns the image icon for the given icon name.
|
javax.swing.ImageIcon |
getWarningSquareIcon() |
public static final java.lang.String SYSTEM_DIR
@NotNull public static final java.lang.String SQUARE_SELECTED_SQUARE
@NotNull public static final java.lang.String SQUARE_SELECTED_SQUARE_NORTH
@NotNull public static final java.lang.String SQUARE_SELECTED_SQUARE_EAST
@NotNull public static final java.lang.String SQUARE_SELECTED_SQUARE_SOUTH
@NotNull public static final java.lang.String SQUARE_SELECTED_SQUARE_WEST
@NotNull public static final java.lang.String SQUARE_PRE_SELECTED_SQUARE
@NotNull public static final java.lang.String SQUARE_CURSOR
@NotNull public static final java.lang.String SQUARE_EMPTY
@NotNull public static final java.lang.String SQUARE_UNKNOWN
public static final java.lang.String SQUARE_WARNING
@NotNull public static final java.lang.String SQUARE_NO_FACE
@NotNull public static final java.lang.String SQUARE_NO_ARCH
@NotNull public static final java.lang.String TREASURE_LIST
@NotNull public static final java.lang.String TREASUREONE_LIST
@NotNull public static final java.lang.String TREASURE_YES
@NotNull public static final java.lang.String TREASURE_NO
@NotNull public static final java.lang.String DEFAULT_ICON
@NotNull public static final java.lang.String DEFAULT_PREVIEW
@NotNull public static final java.lang.String CLOSE_TAB_SMALL_ICON
@NotNull public static final java.lang.String AUTO_RUN_SMALL_ICON
@NotNull public static final java.lang.String FILTER_SMALL_ICON
@NotNull public static final java.lang.String RUN_PLUGIN_SMALL_ICON
@NotNull public static final java.lang.String APP_ICON
@NotNull public javax.swing.ImageIcon getResourceIcon(@NotNull java.lang.String iconName) throws java.util.MissingResourceException
iconName
- the icon namejava.util.MissingResourceException
- if the icon cannot be loadedpublic void addToCache(@NotNull java.lang.String name, @NotNull javax.swing.ImageIcon imageIcon)
name
- the nameimageIcon
- the image icon@NotNull public javax.swing.ImageIcon getWarningSquareIcon()
@NotNull public javax.swing.ImageIcon getLightSquareIcon()
ImageIcon
for highlighting map squares that are
affected by nearby light emitting game objects.