java.lang.Object
com.foreach.across.modules.bootstrapui.elements.icons.SimpleIconSet
All Implemented Interfaces:
IconSet, MutableIconSet

public class SimpleIconSet extends Object implements MutableIconSet
An SimpleIconSet that is made available on an IconSetRegistry
Since:
3.0.0
Author:
Stijn Vanhoof
  • Constructor Details

    • SimpleIconSet

      public SimpleIconSet()
  • Method Details

    • icon

      public com.foreach.across.modules.web.ui.elements.HtmlViewElement icon(String name)
      Description copied from interface: IconSet
      Returns an icon with from the current SimpleIconSet. If no iconResolver function was registered for the requested icon, a fallback to the defaultIconResolver is used.
      Specified by:
      icon in interface IconSet
      Parameters:
      name - of the icon in the SimpleIconSet
      Returns:
      The icon as a AbstractNodeViewElement
    • getAllRegisteredIcons

      public Map<String,com.foreach.across.modules.web.ui.elements.HtmlViewElement> getAllRegisteredIcons()
      Description copied from interface: IconSet
      Gets a map of all registered icons on the IconSet.
      Specified by:
      getAllRegisteredIcons in interface IconSet
      Returns:
      a Map<String, AbstractNodeViewElement> that holds all icons by name
    • add

      public void add(@NonNull @NonNull String name, Function<String,com.foreach.across.modules.web.ui.elements.HtmlViewElement> iconResolver)
      Description copied from interface: MutableIconSet
      Adds an icon to the MutableIconSet.
      Specified by:
      add in interface MutableIconSet
      Parameters:
      name - of the icon to add to the current MutableIconSet.
      iconResolver - that will be used to resolve a AbstractNodeViewElement icon
    • remove

      public void remove(@NonNull @NonNull String name)
      Description copied from interface: MutableIconSet
      Removes an icon from the MutableIconSet.
      Specified by:
      remove in interface MutableIconSet
      Parameters:
      name - of the icon to be removed
    • removeAll

      public void removeAll()
      Description copied from interface: MutableIconSet
      Remove all icons from the MutableIconSet.
      Specified by:
      removeAll in interface MutableIconSet
    • setDefaultIconResolver

      public void setDefaultIconResolver(Function<String,com.foreach.across.modules.web.ui.elements.HtmlViewElement> defaultIconResolver)