Class PredefinedIcon
java.lang.Object
org.patternfly.icon.PredefinedIcon
- All Implemented Interfaces:
ElementAttributeMethods<SVGElement, PredefinedIcon>,ElementClassListMethods<SVGElement, PredefinedIcon>,ElementConsumerMethods<SVGElement, PredefinedIcon>,ElementEventMethods<SVGElement, PredefinedIcon>,ElementIdMethods<SVGElement, PredefinedIcon>,ElementQueryMethods<SVGElement>,ElementTextMethods<SVGElement, PredefinedIcon>,IsElement<SVGElement>,SVGElementDataMethods<SVGElement, PredefinedIcon>,SVGElementStyleMethods<SVGElement, PredefinedIcon>,TypedBuilder<SVGElement, PredefinedIcon>
public final class PredefinedIcon
extends Object
implements ElementAttributeMethods<SVGElement, PredefinedIcon>, ElementClassListMethods<SVGElement, PredefinedIcon>, ElementConsumerMethods<SVGElement, PredefinedIcon>, ElementEventMethods<SVGElement, PredefinedIcon>, ElementIdMethods<SVGElement, PredefinedIcon>, ElementQueryMethods<SVGElement>, ElementTextMethods<SVGElement, PredefinedIcon>, SVGElementDataMethods<SVGElement, PredefinedIcon>, SVGElementStyleMethods<SVGElement, PredefinedIcon>
The PredefinedIcon class represents a predefined SVG icon. It implements SVG builder interfaces and provides methods for
creating and configuring the SVG element for the icon.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionelement()static PredefinedIconpredefinedIcon(String name) Constructs a predefined SVG icon based on the provided icon name.that()Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jboss.elemento.ElementAttributeMethods
aria, aria, aria, attr, attr, attr, role, roleMethods inherited from interface org.jboss.elemento.ElementClassListMethods
classList, classList, css, toggle, toggle, toggleMethods inherited from interface org.jboss.elemento.ElementConsumerMethods
apply, runMethods inherited from interface org.jboss.elemento.ElementEventMethods
on, on, onMethods inherited from interface org.jboss.elemento.ElementIdMethods
id, uniqueIdMethods inherited from interface org.jboss.elemento.ElementQueryMethods
closest, querySelector, querySelectorAllMethods inherited from interface org.jboss.elemento.ElementTextMethods
text, textMethods inherited from interface org.jboss.elemento.svg.SVGElementDataMethods
data
-
Field Details
-
iconSpec
-
-
Method Details
-
predefinedIcon
Constructs a predefined SVG icon based on the provided icon name. The method supports multiple icon groups, such as "fab", "far", "fas", and "patternfly". If the name contains a group prefix (e.g., "fab.iconName"), the method will use that group; otherwise, it defaults to the "fas" group.Normally you should use the static methods from
IconSetsto get predefined icons. Only use this method if you need to get an icon based on the icon name provided as string.- Parameters:
name- the name of the icon, optionally prefixed with the group name (e.g., "fab.iconName"). If no group is specified, "fas" is used by default.- Returns:
- a
PredefinedIconinstance representing the specified icon. - Throws:
IllegalArgumentException- if the group or icon name is unknown.
-
element
- Specified by:
elementin interfaceIsElement<SVGElement>
-
that
- Specified by:
thatin interfaceTypedBuilder<SVGElement, PredefinedIcon>
-