Package com.github.weisj.darklaf.icons
Class CustomThemedIcon
- java.lang.Object
-
- com.github.weisj.darklaf.icons.DarkSVGIcon
-
- com.github.weisj.darklaf.icons.ThemedSVGIcon
-
- com.github.weisj.darklaf.icons.CustomThemedIcon
-
- All Implemented Interfaces:
DerivableIcon<DarkSVGIcon>,DynamicIcon,ImageSource,MutableThemedIcon,RotateIcon,ThemedIcon,Serializable,Icon
public class CustomThemedIcon extends ThemedSVGIcon implements MutableThemedIcon
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCustomThemedIcon.MergeMode
-
Field Summary
Fields Modifier and Type Field Description static Map<Object,Object>LAF_CONTEXT
-
Constructor Summary
Constructors Modifier Constructor Description protectedCustomThemedIcon(int width, int height, CustomThemedIcon icon)CustomThemedIcon(DarkSVGIcon icon)CustomThemedIcon(DarkSVGIcon icon, Map<Object,Object> contextDefaults, CustomThemedIcon.MergeMode mergeMode)CustomThemedIcon(URI uri, int displayWidth, int displayHeight, Map<Object,Object> colors)CustomThemedIcon(Supplier<URI> uriSupplier, int displayWidth, int displayHeight)CustomThemedIcon(Supplier<URI> uriSupplier, int displayWidth, int displayHeight, Map<Object,Object> colors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.kitfox.svg.app.beans.SVGIconcreateSVGIcon()CustomThemedIconderive(int width, int height)Derive a new icon with the specified size.Map<Object,Object>getContextProperties()Map<Object,Object>getProperties()voidmergeProperties(CustomThemedIcon.MergeMode mergeMode, DarkSVGIcon originalIcon)protected voidpatchColors()voidsetContextProperties(Map<Object,Object> props)voidsetProperties(Map<Object,Object> props)-
Methods inherited from class com.github.weisj.darklaf.icons.ThemedSVGIcon
ensureLoaded, ensureTheme, getContextDefaults, invalidate
-
Methods inherited from class com.github.weisj.darklaf.icons.DarkSVGIcon
createImage, ensureImageLoaded, getIconHeight, getIconWidth, getName, getSVGIcon, getUri, isDirectRenderingMode, paintIcon, paintIcon, setDirectRenderingMode, setDisplaySize, updateCache
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.weisj.darklaf.icons.DerivableIcon
copy
-
Methods inherited from interface javax.swing.Icon
getIconHeight, getIconWidth, paintIcon
-
Methods inherited from interface com.github.weisj.darklaf.icons.ImageSource
createImage
-
Methods inherited from interface com.github.weisj.darklaf.icons.MutableThemedIcon
getProperty, getPropertyOfType, setProperty
-
-
-
-
Constructor Detail
-
CustomThemedIcon
public CustomThemedIcon(Supplier<URI> uriSupplier, int displayWidth, int displayHeight)
-
CustomThemedIcon
public CustomThemedIcon(Supplier<URI> uriSupplier, int displayWidth, int displayHeight, Map<Object,Object> colors)
-
CustomThemedIcon
public CustomThemedIcon(URI uri, int displayWidth, int displayHeight, Map<Object,Object> colors)
-
CustomThemedIcon
public CustomThemedIcon(DarkSVGIcon icon)
-
CustomThemedIcon
public CustomThemedIcon(DarkSVGIcon icon, Map<Object,Object> contextDefaults, CustomThemedIcon.MergeMode mergeMode)
-
CustomThemedIcon
protected CustomThemedIcon(int width, int height, CustomThemedIcon icon)
-
-
Method Detail
-
mergeProperties
public void mergeProperties(CustomThemedIcon.MergeMode mergeMode, DarkSVGIcon originalIcon)
-
getProperties
public Map<Object,Object> getProperties()
- Specified by:
getPropertiesin interfaceMutableThemedIcon
-
setProperties
public void setProperties(Map<Object,Object> props)
- Specified by:
setPropertiesin interfaceMutableThemedIcon
-
derive
public CustomThemedIcon derive(int width, int height)
Description copied from interface:DerivableIconDerive a new icon with the specified size.- Specified by:
derivein interfaceDerivableIcon<DarkSVGIcon>- Overrides:
derivein classThemedSVGIcon- Parameters:
width- the new widthheight- the new height.- Returns:
- the derived icon.
-
createSVGIcon
protected com.kitfox.svg.app.beans.SVGIcon createSVGIcon()
- Overrides:
createSVGIconin classDarkSVGIcon
-
getContextProperties
public Map<Object,Object> getContextProperties()
- Specified by:
getContextPropertiesin interfaceMutableThemedIcon
-
setContextProperties
public void setContextProperties(Map<Object,Object> props)
- Specified by:
setContextPropertiesin interfaceMutableThemedIcon
-
patchColors
protected void patchColors()
- Overrides:
patchColorsin classThemedSVGIcon
-
-