Class FontIconsDefinition

All Implemented Interfaces:
EventListener, IFontConsumer, IGProp<GProp<?>[]>, IFontIconStyle, IPropCnr, Cloneable
Direct Known Subclasses:
EditorFontIconsDefinition

public class FontIconsDefinition extends AbstractImageDefinition implements IFontIconStyle, IFontConsumer
The Font Icon Definition property container that contains an installable font using @FontFace CSS and contains several icons that can be displayed in any square size.
Author:
Christopher Mindus
  • Field Details

  • Constructor Details

    • FontIconsDefinition

      public FontIconsDefinition()
      Creates the Images Definition property container without a name. The name must be set in all cases using the setPropertyAtom call.
    • FontIconsDefinition

      public FontIconsDefinition(Atom propertyAtom)
      Creates the Images Definition property container with the specified name. All system-reserved names for components begins with "$".
      Parameters:
      propertyAtom - the name of the component, unique within it's parent.
  • Method Details

    • addPredefinedProps

      protected void addPredefinedProps() throws PropException
      Adds the predefined properties for this container. This method is called once just after construction of the property container.

      Properties added:

       - InputProps as Atom.INPUT
      

      Overrides:
      addPredefinedProps in class PropCnr
      Throws:
      PropException - for property exceptions.
    • getPredefinedProps

      protected void getPredefinedProps()
      Gets the references to predefined properties. If the Styles is created, make sure to get it.
      Overrides:
      getPredefinedProps in class PropCnr
    • createFontFiles

      protected FontFiles createFontFiles()
      Creates the FontIconFiles container, overidden by the Editor version of the property.
    • getFontFiles

      public FontFiles getFontFiles()
      Gets the font icon files container referenced.
    • getFontFilesList

      public List<FontFiles> getFontFilesList()
      The read-only list with the single font files instance.
    • getStatesCSS

      public String[] getStatesCSS()
      Gets the state CSS'es for RTL, Disable, Press, Select, Focus, Hover and Capture.

      Slot 0, the default or normal state, is DELIBERATELY left empty here: this accessor covers the seven explicit states only, which is why the list above starts at RTL. The per-icon accessor FontIconDefinition.getStatesCSS() is the one that fills slot 0, from ICON_CSS on the icon and then on this definition as its fallback. The two therefore answer differently for the same definition, on purpose.

      NO CALLER: as of 2026-08-19 nothing in com.iizix.core, com.iizix.server or com.iizigo calls this method. Every getStatesCSS() call site in the tree resolves on FontIconDefinition or on its Editor subclass. Weigh that before relying on it.

      Returns:
      A new array with the state CSS'es, where an empty setting is assigned an empty string.
    • collectConsumedFonts

      public void collectConsumedFonts(Set<FontConsumed> fonts)
      Collects the consumed fonts.
      Specified by:
      collectConsumedFonts in interface IFontConsumer
      Parameters:
      fonts - The set of consumed fonts is filled in by this method.