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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(@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.HtmlViewElement
Returns an icon with from the currentSimpleIconSet
.void
Removes an icon from theMutableIconSet
.void
Remove all icons from theMutableIconSet
.void
setDefaultIconResolver
(Function<String, com.foreach.across.modules.web.ui.elements.HtmlViewElement> defaultIconResolver)
-
Constructor Details
-
SimpleIconSet
public SimpleIconSet()
-
-
Method Details
-
icon
Description copied from interface:IconSet
Returns 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:
icon
in 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:IconSet
Gets a map of all registered icons on theIconSet
.- Specified by:
getAllRegisteredIcons
in 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:MutableIconSet
Adds an icon to theMutableIconSet
.- Specified by:
add
in interfaceMutableIconSet
- Parameters:
name
- of the icon to add to the currentMutableIconSet
.iconResolver
- that will be used to resolve aAbstractNodeViewElement
icon
-
remove
Description copied from interface:MutableIconSet
Removes an icon from theMutableIconSet
.- Specified by:
remove
in interfaceMutableIconSet
- Parameters:
name
- of the icon to be removed
-
removeAll
public void removeAll()Description copied from interface:MutableIconSet
Remove all icons from theMutableIconSet
.- Specified by:
removeAll
in interfaceMutableIconSet
-
setDefaultIconResolver
-