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

    Fields
    Modifier and Type
    Field
    Description
    static 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 Type
    Method
    Description
    void
    add(org.kordamp.ikonli.Ikon... ikons)
    Adds the given ikons to this Icons instance.
    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
     
    int
     
  • Field Details

    • SIZE

      static final PropertyValue<Integer> SIZE
      The default icon size, note that this will affect the size of buttons
      • Value type: Integer
      • Default value: 16
    • COLOR

      static final PropertyValue<Color> COLOR
      The default icon color.
      • Value type: Color
      • Default value: UIManager.getColor("Button.foreground")
  • Method Details

    • color

      Value<Color> 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 via get(Ikon).
      Parameters:
      ikons - the ikons to add
      Throws:
      IllegalArgumentException - in case an icon has already been associated with any of the given ikons
    • get

      ImageIcon get(org.kordamp.ikonli.Ikon ikon)
      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

      static Icons icons()
      Returns:
      a new Icons instance