Class SimpleIconSet
java.lang.Object
com.foreach.across.modules.bootstrapui.elements.icons.SimpleIconSet
- All Implemented Interfaces:
IconSet,MutableIconSet
An
SimpleIconSet that is made available on an IconSetRegistry- Since:
- 3.0.0
- Author:
- Stijn Vanhoof
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(@NonNull String name, Function<String, com.foreach.across.modules.web.ui.elements.HtmlViewElement> iconResolver) Adds an icon to theMutableIconSet.Gets a map of all registered icons on theIconSet.com.foreach.across.modules.web.ui.elements.HtmlViewElementReturns an icon with from the currentSimpleIconSet.voidRemoves an icon from theMutableIconSet.voidRemove all icons from theMutableIconSet.voidsetDefaultIconResolver(Function<String, com.foreach.across.modules.web.ui.elements.HtmlViewElement> defaultIconResolver)
-
Constructor Details
-
SimpleIconSet
public SimpleIconSet()
-
-
Method Details
-
icon
Description copied from interface:IconSetReturns an icon with from the currentSimpleIconSet. If no iconResolver function was registered for the requested icon, a fallback to the defaultIconResolver is used.- Specified by:
iconin interfaceIconSet- Parameters:
name- of the icon in theSimpleIconSet- Returns:
- The icon as a
AbstractNodeViewElement
-
getAllRegisteredIcons
public Map<String,com.foreach.across.modules.web.ui.elements.HtmlViewElement> getAllRegisteredIcons()Description copied from interface:IconSetGets a map of all registered icons on theIconSet.- Specified by:
getAllRegisteredIconsin interfaceIconSet- 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:MutableIconSetAdds an icon to theMutableIconSet.- Specified by:
addin interfaceMutableIconSet- Parameters:
name- of the icon to add to the currentMutableIconSet.iconResolver- that will be used to resolve aAbstractNodeViewElementicon
-
remove
Description copied from interface:MutableIconSetRemoves an icon from theMutableIconSet.- Specified by:
removein interfaceMutableIconSet- Parameters:
name- of the icon to be removed
-
removeAll
public void removeAll()Description copied from interface:MutableIconSetRemove all icons from theMutableIconSet.- Specified by:
removeAllin interfaceMutableIconSet
-
setDefaultIconResolver
-