Interface Icons

All Known Implementing Classes:
IconsImpl

public interface Icons
A bean that resolves icon sources for icon sets defined for the project.

Examples:

 excelButton.setIcon(icons.get(JmixIcon.EXCEL_ACTION));
 helpButton.setIcon(icons.get(JmixIcon.INFO));
 
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Interface for enumerations that represent icon sets.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Pattern
     
  • Method Summary

    Modifier and Type
    Method
    Description
    For the given Icons.Icon instance, returns the icon source that can be used to set this icon to components.
    get(String iconName)
    For the given Icons.Icon.iconName(), returns the icon source that can be used to set this icon to components.
  • Field Details

    • ICON_NAME_REGEX

      static final Pattern ICON_NAME_REGEX
  • Method Details

    • get

      @Nullable String get(@Nullable Icons.Icon icon)
      For the given Icons.Icon instance, returns the icon source that can be used to set this icon to components.

      Example:

       createButton.setIcon(icons.get(JmixIcon.CREATE));
       
      Parameters:
      icon - Icons.Icon instance
      Returns:
      icon source (see Icons.Icon.source())
    • get

      @Nullable String get(@Nullable String iconName)
      For the given Icons.Icon.iconName(), returns the icon source that can be used to set this icon to components.

      Example:

       importButton.setIcon(icons.get("IMPORT"));
       
      Parameters:
      iconName - icon name that contains only uppercase letters and underscores
      Returns:
      icon source (see Icons.Icon.source())