Class GuiIcon

  • All Implemented Interfaces:
    IGuiIcon, Serializable

    @Immutable
    public final class GuiIcon
    extends Object
    implements IGuiIcon
    Default implementation of IGuiIcon for common icon libraries. Supports font awesome, ui-icon, material-icon, and ico-fc (custom FORMCYCLE icon library).
    Since:
    7.0.0
    Author:
    XIMA MEDIA GmbH
    See Also:
    Serialized Form
    • Field Detail

      • EMPTY

        public static final IGuiIcon EMPTY
    • Method Detail

      • getId

        public String getId()
        Specified by:
        getId in interface IGuiIcon
        Returns:
        The ID of this icon, eg. ico-fc-lock-alert.
      • isFcIcon

        public boolean isFcIcon()
        Specified by:
        isFcIcon in interface IGuiIcon
        Returns:
        Whether the IGuiIcon.getType() refers to an icon from the FORMCYCLE icon font.
      • isUiIcon

        public boolean isUiIcon()
        Specified by:
        isUiIcon in interface IGuiIcon
        Returns:
        Whether the IGuiIcon.getType() refers to an icon from the UI (primefaces) icon font.
      • isFaIcon

        public boolean isFaIcon()
        Specified by:
        isFaIcon in interface IGuiIcon
        Returns:
        Whether the IGuiIcon.getType() refers to an icon from the Font Awesome icon font.
      • getType

        public EIconType getType()
        Specified by:
        getType in interface IGuiIcon
        Returns:
        The type of icon font of this icon.
      • getStyle

        public String getStyle()
        Specified by:
        getStyle in interface IGuiIcon
        Returns:
        The inline style that need to be set on an HTML element to create this icon. Can be used to include custom base64 inline icons.
      • getStyleClass

        public String getStyleClass()
        Specified by:
        getStyleClass in interface IGuiIcon
        Returns:
        The CSS class(es) that need to be set on an HTML element to create this icon.
      • getValue

        public String getValue()
        Specified by:
        getValue in interface IGuiIcon
        Returns:
        The textValue that needs to be set on an HTML element to create this icon.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • valueOf

        public static IGuiIcon valueOf​(String id)
        Parameters:
        id - The ID of the icon, e.g. ico-fc-lock-alert, alarm-off, or fa-cog.
        Returns:
        A #IGuiIcon representing the icon with the given ID.