- All Known Subinterfaces:
FrameworkIcons
- All Known Implementing Classes:
DefaultFrameworkIcons
public interface Icons
Provides icons for ui components.
color()
follows the 'Button.foreground' color of the current Look and feel.
Add icons via add(Ikon...)
and retrieve them via get(Ikon)
.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PropertyValue
<Color> The default icon color.static final PropertyValue
<Integer> The default 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 Icons instance.color()
Follows the 'Button.foreground' color of the current Look and feel.get
(org.kordamp.ikonli.Ikon ikon) Retrieves the ImageIcon associated with the given ikon from this Icons instance.static Icons
icons()
int
size()
-
Field Details
-
SIZE
The default icon size, note that this will affect the size of buttons- Value type: Integer
- Default value: 16
-
COLOR
The default icon color.- Value type: Color
- Default value: UIManager.getColor("Button.foreground")
-
-
Method Details
-
color
Follows the 'Button.foreground' color of the current Look and feel.- Returns:
- the
Value
controlling the icon color
-
size
int size()- Returns:
- the icon size
-
add
void add(org.kordamp.ikonli.Ikon... ikons) Adds the given ikons to this Icons instance. Retrieve an icon viaget(Ikon)
.- Parameters:
ikons
- the ikons to add- Throws:
IllegalArgumentException
- in case an icon has already been associated with any of the given ikons
-
get
Retrieves the ImageIcon associated with the given ikon from this Icons 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:
-
icons
- Returns:
- a new
Icons
instance
-