Class IconManager
java.lang.Object
ca.phon.util.icons.IconManager
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildFontIcon
(String fontName, String iconName, IconSize size, Color color) Create a new icon from the jIconFont library using the given font name, icon name, size, and colour.createGlyphIcon
(Character c, Font font, Color foreground, Color background) Create a new icon with a single character using the given foreground, background.createIconStrip
(Icon[] icons) Combine icons into an icon strip.createIconStrip
(Icon[] icons, int offset) getDisabledIcon
(String iconName, IconSize size) getDisabledIcon
(Icon icon) getFontIcon
(String name, IconSize size, Color color) Get the specified icon with the given size and colorgetFontIcon
(String fontName, String iconName, IconSize size, Color color) Get the specified icon with the given size and colorgetGrayedIcon
(String iconName, IconSize size) getGrayedIcon
(Icon icon) static IconManager
Returns the shared IconManager instancegetSystemIconForFileType
(String filetype, IconSize size) Load system icon for given file type.getSystemIconForFileType
(String filetype, String backupIcon, IconSize size) Load system icon for given file type.getSystemIconForPath
(String path, IconSize size) Load system icon for given path.getSystemIconForPath
(String path, String backupIcon, IconSize size) Load system icon for given path.getSystemStockIcon
(ca.hedlund.desktopicons.StockIcon stockIcon, IconSize size) Load system stock icon.getSystemStockIcon
(ca.hedlund.desktopicons.StockIcon stockIcon, String backupIcon, IconSize size) Load system stock icon.
-
Field Details
-
FontAwesomeFontName
- See Also:
-
GoogleMaterialDesignIconsFontName
- See Also:
-
-
Constructor Details
-
IconManager
protected IconManager()Constructor
-
-
Method Details
-
getInstance
Returns the shared IconManager instance -
getIcon
-
getGrayedIcon
-
getDisabledIcon
-
createGlyphIcon
Create a new icon with a single character using the given foreground, background. The size of the icon will be the size of the bounding rectangle returned byFontMetrics.getStringBounds(String, java.awt.Graphics)
- Parameters:
c
-font
-foreground
-background
-
-
createIconStrip
-
createIconStrip
-
getGrayedIcon
-
getDisabledIcon
-
getSystemIconForPath
-
getSystemIconForPath
-
getSystemIconForFileType
-
getSystemIconForFileType
Load system icon for given file type. File type should be an extension without a leading '.'- Parameters:
filetype
-backupIcon
- icon name used as backup if system icon not found, may benull
size
-- Returns:
- icon for given file type or backup icon if not found
-
getSystemStockIcon
-
getSystemStockIcon
public ImageIcon getSystemStockIcon(ca.hedlund.desktopicons.StockIcon stockIcon, String backupIcon, IconSize size) Load system stock icon. Use a value from either MacOSStockIcon or WindowsStockIcon enums.- Parameters:
stockIcon
-backupIcon
- icon name used as backup if system icon not foundsize
-- Returns:
- icon for given file type or backup icon if not found
-
getFontIcon
-
buildFontIcon
-
getFontIcon
-