Class VStyle
java.lang.Object
org.vaadin.firitin.util.VStyle
-
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 TypeMethodDescriptionvoid
apply
(com.vaadin.flow.component.Component component) Applies the styles defined in this VStyle to the given component.void
Applies the styles defined in this VStyle to an element specified by the context component and css selector.void
applyToShadowRoot
(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.Color
in.virit.color.Color
getColor()
getNames()
boolean
setBackgroundColor
(in.virit.color.Color color) setColor
(in.virit.color.Color color) static VStyle
wrap
(com.vaadin.flow.dom.Style original) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
clear
in interfacecom.vaadin.flow.dom.Style
-
has
- Specified by:
has
in 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
-
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
-