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 voidapplyTo(HTMLElement element, int value)voidapplyTo(HTMLElement element, String value)<V> voidapplyTo(HTMLElement element, Breakpoints<V> breakpoints)<V> voidapplyTo(HTMLElement element, Breakpoints<V> breakpoints, Function<V,String> stringValue)<E extends HTMLElement,B extends TypedBuilder<E,B>>
BapplyTo(HasHTMLElement<E,B> element, int value)<E extends HTMLElement,B extends TypedBuilder<E,B>>
BapplyTo(HasHTMLElement<E,B> element, String value)<E extends HTMLElement,B extends TypedBuilder<E,B>,V>
BapplyTo(HasHTMLElement<E,B> element, Breakpoints<V> breakpoints)<E extends HTMLElement,B extends TypedBuilder<E,B>,V>
BapplyTo(HasHTMLElement<E,B> element, Breakpoints<V> breakpoints, Function<V,String> stringValue)<E extends SVGElement,B extends TypedBuilder<E,B>>
BapplyTo(HasSVGElement<E,B> element, int value)<E extends SVGElement,B extends TypedBuilder<E,B>>
BapplyTo(HasSVGElement<E,B> element, String value)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>> B applyTo(HasHTMLElement<E,B> element, int value)
-
applyTo
public <E extends HTMLElement,B extends TypedBuilder<E,B>> B applyTo(HasHTMLElement<E,B> element, String value)
-
applyTo
public <E extends HTMLElement,B extends TypedBuilder<E,B>,V> B applyTo(HasHTMLElement<E,B> element, Breakpoints<V> breakpoints)
-
applyTo
public <E extends HTMLElement,B extends TypedBuilder<E,B>,V> B applyTo(HasHTMLElement<E,B> element, Breakpoints<V> breakpoints, Function<V,String> stringValue)
-
applyTo
public <E extends SVGElement,B extends TypedBuilder<E,B>> B applyTo(HasSVGElement<E,B> element, int value)
-
applyTo
public <E extends SVGElement,B extends TypedBuilder<E,B>> B applyTo(HasSVGElement<E,B> element, String value)
-
applyTo
public void applyTo(HTMLElement element, int value)
-
applyTo
public void applyTo(HTMLElement element, String value)
-
applyTo
public <V> void applyTo(HTMLElement element, Breakpoints<V> breakpoints)
-
applyTo
public <V> void applyTo(HTMLElement element, Breakpoints<V> breakpoints, Function<V,String> stringValue)
-
-