Package org.fife.rsta.ac.css
Class IconFactory
- java.lang.Object
-
- org.fife.rsta.ac.css.IconFactory
-
final class IconFactory extends java.lang.ObjectThe icons for CSS properties and values.- Version:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,javax.swing.Icon>iconMapprivate static IconFactoryinstance
-
Constructor Summary
Constructors Modifier Constructor Description privateIconFactory()Private constructor to prevent instantiation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IconFactoryget()Returns the singleton instance of this class.javax.swing.IcongetIcon(java.lang.String key)Returns the icon requested.private javax.swing.IconloadIcon(java.lang.String name)Loads an icon by file name.
-
-
-
Field Detail
-
instance
private static IconFactory instance
-
iconMap
private java.util.Map<java.lang.String,javax.swing.Icon> iconMap
-
-
Method Detail
-
get
public static IconFactory get()
Returns the singleton instance of this class.- Returns:
- The singleton instance.
-
getIcon
public javax.swing.Icon getIcon(java.lang.String key)
Returns the icon requested.- Parameters:
key- The key for the icon.- Returns:
- The icon.
-
loadIcon
private javax.swing.Icon loadIcon(java.lang.String name)
Loads an icon by file name.- Parameters:
name- The icon file name.- Returns:
- The icon.
-
-