- All Known Subinterfaces:
FrameworkIcons
- All Known Implementing Classes:
DefaultFrameworkIcons
public interface Icons
Provides icons for ui components.
The icon color follows the 'Button.foreground' color of the current Look and feel.
Add icons via
add(Ikon...)
(Ikon)} and retrieve them via icon(Ikon)
.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final PropertyValue<Color>
The icon color
Value type: Color
Default value: UIManager.getColor("Button.foreground")static final PropertyValue<Integer>
The icon size, note that this will affect the size of buttons
Value type: Integer
Default value: 16 -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(org.kordamp.ikonli.Ikon... ikons) Adds the given ikons to this FrameworkIcons instance.Disables the dynamic color change listenerAdds a listener to theICON_COLOR
property value, dynamically changing the color of the icons in this instance.icon
(org.kordamp.ikonli.Ikon ikon) Retrieves the ImageIcon associated with the given ikon from this FrameworkIcons instance.void
Sets the icon colorstatic Icons
icons()
-
Field Details
-
DEFAULT_ICON_SIZE
static final int DEFAULT_ICON_SIZE- See Also:
-
ICON_SIZE
The icon size, note that this will affect the size of buttons
Value type: Integer
Default value: 16 -
ICON_COLOR
The icon color
Value type: Color
Default value: UIManager.getColor("Button.foreground")
-
-
Method Details
-
add
void add(org.kordamp.ikonli.Ikon... ikons) Adds the given ikons to this FrameworkIcons instance. Retrieve an icon viaicon(Ikon)
.- Parameters:
ikons
- the ikons to add- Throws:
IllegalArgumentException
- in case an icon has already been associated with any of the given ikons
-
icon
Retrieves the ImageIcon associated with the given ikon from this FrameworkIcons instance.- Parameters:
ikon
- the ikon- Returns:
- the ImageIcon associated with the given ikon
- Throws:
IllegalArgumentException
- in case no icon has been associated with the given ikon- See Also:
-
iconColor
Sets the icon color- Parameters:
color
- the color
-
enableIconColorListener
Icons enableIconColorListener()Adds a listener to theICON_COLOR
property value, dynamically changing the color of the icons in this instance.- Returns:
- this icons instance
-
disableIconColorListener
Icons disableIconColorListener()Disables the dynamic color change listener- Returns:
- this icons instance
-
icons
- Returns:
- a new
Icons
instance
-