Class VStyle
java.lang.Object
org.vaadin.firitin.util.VStyle
- All Implemented Interfaces:
 com.vaadin.flow.dom.Style, Serializable
- See Also:
 
- 
Nested Class Summary
Nested classes/interfaces inherited from interface com.vaadin.flow.dom.Style
com.vaadin.flow.dom.Style.AlignItems, com.vaadin.flow.dom.Style.AlignSelf, com.vaadin.flow.dom.Style.BoxSizing, com.vaadin.flow.dom.Style.Clear, com.vaadin.flow.dom.Style.Display, com.vaadin.flow.dom.Style.FlexBasis, com.vaadin.flow.dom.Style.FlexDirection, com.vaadin.flow.dom.Style.FlexWrap, com.vaadin.flow.dom.Style.FloatCss, com.vaadin.flow.dom.Style.FontWeight, com.vaadin.flow.dom.Style.JustifyContent, com.vaadin.flow.dom.Style.Overflow, com.vaadin.flow.dom.Style.Position, com.vaadin.flow.dom.Style.TextAlign, com.vaadin.flow.dom.Style.Visibility, com.vaadin.flow.dom.Style.WhiteSpace - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidapply(com.vaadin.flow.component.Component component) Applies the styles defined in this VStyle to the given component.voidApplies the styles defined in this VStyle to an element specified by the context component and css selector.voidapplyToShadowRoot(com.vaadin.flow.component.Component component, String cssSelector) Applies the styles defined in this VStyle to an element specified by the context component and css selector, but specifically to the shadow root of the component.clear()in.virit.color.Colorin.virit.color.ColorgetColor()getNames()booleanvoidinjectWithSelectors(String... cssSelectors) Injects the styles defined in this object to the host page as CSS, for the given CSS selector.setBackgroundColor(in.virit.color.Color color) setColor(in.virit.color.Color color) static VStylewrap(com.vaadin.flow.dom.Style original) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.dom.Style
setAlignItems, setAlignSelf, setBackground, setBackgroundColor, setBorder, setBorderBottom, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBottom, setBoxShadow, setBoxSizing, setClear, setColor, setCursor, setDisplay, setFlexBasis, setFlexBasis, setFlexDirection, setFlexGrow, setFlexShrink, setFlexWrap, setFloat, setFont, setFontSize, setFontWeight, setFontWeight, setFontWeight, setHeight, setJustifyContent, setLeft, setLineHeight, setMargin, setMarginBottom, setMarginInlineEnd, setMarginInlineStart, setMarginLeft, setMarginRight, setMarginTop, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOpacity, setOutline, setOverflow, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPosition, setRight, setScale, setTextAlign, setTextDecoration, setTop, setTransform, setTransformOrigin, setTransition, setVisibility, setWhiteSpace, setWidth, setZIndex 
- 
Constructor Details
- 
VStyle
public VStyle(com.vaadin.flow.dom.Style wrapped)  - 
VStyle
public VStyle() 
 - 
 - 
Method Details
- 
wrap
 - 
getColor
public in.virit.color.Color getColor() - 
setColor
 - 
getBackgroundColor
public in.virit.color.Color getBackgroundColor() - 
setBackgroundColor
 - 
get
 - 
set
 - 
remove
 - 
clear
- Specified by:
 clearin interfacecom.vaadin.flow.dom.Style
 - 
has
- Specified by:
 hasin interfacecom.vaadin.flow.dom.Style
 - 
getNames
 - 
apply
public void apply(com.vaadin.flow.component.Component component) Applies the styles defined in this VStyle to the given component.- Parameters:
 component- the component to which the styles will be applied
 - 
apply
Applies the styles defined in this VStyle to an element specified by the context component and css selector.Note that the styles are applied to the element after it has been rendered using JS. If you happen to use "preserve on refresh" feature of Vaadin, you might need to call this method again after the refresh, as the styles are not preserved automatically.
- Parameters:
 component- the component to which the styles will be appliedcssSelector- the CSS selector to target the specific element within the component
 - 
injectWithSelectors
Injects the styles defined in this object to the host page as CSS, for the given CSS selector.- Parameters:
 cssSelectors- the CSS selector to target the specific element within the host page
 - 
toCss
 - 
applyToShadowRoot
Applies the styles defined in this VStyle to an element specified by the context component and css selector, but specifically to the shadow root of the component.Note that the styles are applied to the element after it has been rendered using JS. If you happen to use "preserve on refresh" feature of Vaadin, you might need to call this method again after the refresh, as the styles are not preserved automatically.
- Parameters:
 component- the component to which the styles will be appliecssSelector- the CSS selector to target the specific element within the component's shadow root
 
 -