Package org.patternfly.style
Class Variable
java.lang.Object
org.patternfly.style.Variable
Provides methods to build and apply PatternFly global and component variables.
- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionapplyTo
(HTMLElement element) <E extends HTMLElement,
B extends TypedBuilder<E, B>>
VariableAssignments.HTMLBuilder<E, B> applyTo
(HasHTMLElement<E, B> element) <E extends SVGElement,
B extends TypedBuilder<E, B>>
VariableAssignments.SVGBuilder<E, B> applyTo
(HasSVGElement<E, B> element) asVar()
static Variable
componentVar
(String component, String... elements) Constructs a component variable with the given component and elements.static Variable
Constructs a global variable with the given elements.static Variable
Constructs a utility variable with the given elements.
-
Field Details
-
scope
-
name
-
-
Method Details
-
globalVar
Constructs a global variable with the given elements.- Parameters:
firstElement
- the first element to include in the variable nameotherElements
- additional elements to append to the variable name- Returns:
- a new
Variable
object with the constructed variable name
-
utilVar
Constructs a utility variable with the given elements.- Parameters:
firstElement
- the first element to include in the variable nameotherElements
- additional elements to append to the variable name- Returns:
- a new
Variable
object with the constructed variable name
-
componentVar
Constructs a component variable with the given component and elements.- Parameters:
component
- the fully qualified component name built withClasses.component(String, String...)
elements
- optional elements to append to the component name- Returns:
- a new
Variable
object
-
asVar
-
applyTo
public <E extends HTMLElement,B extends TypedBuilder<E, VariableAssignments.HTMLBuilder<E,B>> B> applyTo(HasHTMLElement<E, B> element) -
applyTo
public <E extends SVGElement,B extends TypedBuilder<E, VariableAssignments.SVGBuilder<E,B>> B> applyTo(HasSVGElement<E, B> element) -
applyTo
-