Package com.github.weisj.darklaf.icons
Class LazyUIAwareIcon
- java.lang.Object
-
- com.github.weisj.darklaf.icons.DefaultUIAwareIcon
-
- com.github.weisj.darklaf.icons.LazyUIAwareIcon
-
- All Implemented Interfaces:
DynamicIcon,UIAwareIcon,Icon
public class LazyUIAwareIcon extends DefaultUIAwareIcon
-
-
Field Summary
-
Fields inherited from class com.github.weisj.darklaf.icons.DefaultUIAwareIcon
dark, light
-
-
Constructor Summary
Constructors Modifier Constructor Description LazyUIAwareIcon(IconSupplier<Icon> lightSupplier, IconSupplier<Icon> darkSupplier)protectedLazyUIAwareIcon(LazyUIAwareIcon dual)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected UIAwareIconcreateDual()protected IconloadDarkIcon()Load the dark version of the icon.protected IconloadLightIcon()Load the light version of the icon.-
Methods inherited from class com.github.weisj.darklaf.icons.DefaultUIAwareIcon
getDual, getIconHeight, getIconWidth, paintIcon
-
-
-
-
Constructor Detail
-
LazyUIAwareIcon
public LazyUIAwareIcon(IconSupplier<Icon> lightSupplier, IconSupplier<Icon> darkSupplier)
-
LazyUIAwareIcon
protected LazyUIAwareIcon(LazyUIAwareIcon dual)
-
-
Method Detail
-
createDual
protected UIAwareIcon createDual()
- Specified by:
createDualin classDefaultUIAwareIcon
-
loadLightIcon
protected Icon loadLightIcon()
Description copied from class:DefaultUIAwareIconLoad the light version of the icon. This method should never return a null value.- Specified by:
loadLightIconin classDefaultUIAwareIcon- Returns:
- the light icon.
-
loadDarkIcon
protected Icon loadDarkIcon()
Description copied from class:DefaultUIAwareIconLoad the dark version of the icon. This method should never return a null value.- Specified by:
loadDarkIconin classDefaultUIAwareIcon- Returns:
- the dark icon.
-
-