com.alee.utils.swing
Class EnumLazyIconProvider
java.lang.Object
com.alee.utils.swing.EnumLazyIconProvider
public class EnumLazyIconProvider
- extends java.lang.Object
Special class for simple and lazy enum icons retrieval.
- Author:
- Mikle Garin
Method Summary |
static
<E extends java.lang.Enum<E>>
javax.swing.ImageIcon |
|
getIcon(E enumeration,
java.lang.String folder)
Returns cached or just loaded enum icon. |
static
<E extends java.lang.Enum<E>>
javax.swing.ImageIcon |
|
getIcon(E enumeration,
java.lang.String state,
java.lang.String folder)
Returns cached or just loaded enum icon for the specified state. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EnumLazyIconProvider
public EnumLazyIconProvider()
getIcon
public static <E extends java.lang.Enum<E>> javax.swing.ImageIcon getIcon(E enumeration,
java.lang.String folder)
- Returns cached or just loaded enum icon.
- Type Parameters:
E
- enumeration type- Parameters:
enumeration
- enumeration constant for which icon should be loadedfolder
- enumeration icons folder
- Returns:
- cached or just loaded enum icon
getIcon
public static <E extends java.lang.Enum<E>> javax.swing.ImageIcon getIcon(E enumeration,
java.lang.String state,
java.lang.String folder)
- Returns cached or just loaded enum icon for the specified state.
State string will be used to determine icon name automatically.
- Type Parameters:
E
- enumeration type- Parameters:
enumeration
- enumeration constant for which icon should be loadedstate
- enumeration icon statefolder
- enumeration icons folder
- Returns:
- cached or just loaded enum icon