Package com.github.weisj.darklaf.icons
Interface MutableThemedIcon
- All Superinterfaces:
DynamicIcon,Icon,ThemedIcon
- All Known Implementing Classes:
CustomThemedIcon
-
Method Summary
Modifier and TypeMethodDescriptiondefault ObjectgetProperty(Object key)Get a property.default <T> TgetPropertyOfType(Object key, Class<T> type)Get a property of a given type.voidsetContextProperties(Map<Object,Object> props)voidsetProperties(Map<Object,Object> props)default voidsetProperty(Object key, Object value)Set a property if the underlying property map supports mutation.Methods inherited from interface javax.swing.Icon
getIconHeight, getIconWidth, paintIcon
-
Method Details
-
getProperties
-
setProperties
-
getContextProperties
-
setContextProperties
-
setProperty
Set a property if the underlying property map supports mutation.- Parameters:
key- the property key.value- the property value.- Throws:
UnsupportedOperationException- if the underlying property map doesnt support mutation.
-
getProperty
Get a property.- Parameters:
key- the property key.- Returns:
- the property value.
-
getPropertyOfType
Get a property of a given type.- Type Parameters:
T- the types type parameter.- Parameters:
key- the property key.type- the type.- Returns:
- the property value if the type matches or null otherwise.
-