Stateful
Selects a stateful variant of an image, based on the current state. Stateful variants are Focused, Pressed, Hovered, and Disabled. If an image does not have the required stateful variant, the base one will be used.
If the state is a FocusableComponentState and its isFocused property is true, then the Focused variant will be used.
For the base image name myIcon.svg, for example:
| State | Stateful image names |
|---|---|
| Disabled | myIconDisabled.svg |
| Enabled, focused | myIconFocused.svg |
| Enabled, pressed | myIconPressed.svg |
| Enabled, hovered | myIconHovered.svg |
| Enabled, at rest | myIcon.svg |
Note that the Swing Compat mode value might prevent the selection of the pressed and hovered states, when true.