Package org.patternfly.style
Class Variable
- java.lang.Object
-
- org.patternfly.style.Variable
-
public class Variable extends Object
Provides methods to build and apply PatternFly global and component variables.
-
-
Field Summary
Fields Modifier and Type Field Description StringnameVariableScopescope
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description VariableAssignments.HTMLElementapplyTo(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)static VariablecomponentVar(String component, String... elements)Constructs a component variable with the given component and elements.static VariableglobalVar(String firstElement, String... otherElements)Constructs a global variable with the given elements.
-
-
-
Field Detail
-
scope
public final VariableScope scope
-
name
public final String name
-
-
Method Detail
-
globalVar
public static Variable globalVar(String firstElement, String... otherElements)
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
Variableobject with the constructed variable name
-
componentVar
public static Variable componentVar(String component, String... elements)
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
Variableobject
-
applyTo
public <E extends HTMLElement,B extends TypedBuilder<E,B>> VariableAssignments.HTMLBuilder<E,B> applyTo(HasHTMLElement<E,B> element)
-
applyTo
public <E extends SVGElement,B extends TypedBuilder<E,B>> VariableAssignments.SVGBuilder<E,B> applyTo(HasSVGElement<E,B> element)
-
applyTo
public VariableAssignments.HTMLElement applyTo(HTMLElement element)
-
-