Class ImmutableEmptyStyle
- All Implemented Interfaces:
Style,Serializable
For internal use only. May be renamed or removed in a future release.
- Since:
- 1.0
- Author:
- Vaadin Ltd
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.vaadin.flow.dom.Style
Style.AlignItems, Style.AlignSelf, Style.BoxSizing, Style.Clear, Style.Display, Style.FlexBasis, Style.FlexDirection, Style.FlexWrap, Style.FloatCss, Style.FontWeight, Style.JustifyContent, Style.Overflow, Style.Position, Style.TextAlign, Style.Visibility, Style.WhiteSpace -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBinds the given style property to the provided string signal and keeps the style property value synchronized with the signal.clear()Removes all set style properties.Gets the value of the given style property.getNames()Gets the defined style property names.booleanChecks if the given style property has been set.Removes the given style property if it has been set.Sets the given style property to the given value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.dom.Style
getColorScheme, setAlignItems, setAlignSelf, setBackground, setBackgroundColor, setBackgroundPosition, setBackgroundSize, setBorder, setBorderBottom, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBottom, setBoxShadow, setBoxSizing, setClear, setColor, setColorScheme, setCursor, setDisplay, setFilter, setFlexBasis, setFlexBasis, setFlexDirection, setFlexGrow, setFlexShrink, setFlexWrap, setFloat, setFont, setFontSize, setFontWeight, setFontWeight, setFontWeight, setGap, 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, setRotate, setScale, setTextAlign, setTextDecoration, setTop, setTransform, setTransformOrigin, setTransition, setVisibility, setWhiteSpace, setWidth, setZIndex
-
Constructor Details
-
ImmutableEmptyStyle
public ImmutableEmptyStyle()
-
-
Method Details
-
get
Description copied from interface:StyleGets the value of the given style property.Note that the name should be in camelCase and not dash-separated, i.e., use "fontFamily" and not "font-family".
When a style property is bound to a signal with
Style.bind(String, Signal), this method returns the value of the latest signal applied for the given style property name while the element was in the attached state. -
set
Description copied from interface:StyleSets the given style property to the given value.Both camelCased (e.g.
fontFamily) and dash-separated (e.g.font-familyversions are supported.While a signal binding for a specific style name is active, any attempt to manually set that same style throws a
BindingActiveException. -
remove
Description copied from interface:StyleRemoves the given style property if it has been set.Both camelCased (e.g.
fontFamily) and dash-separated (e.g.font-familyversions are supported.While a signal binding for a specific style name is active, any attempt to manually remove that same style throws a
BindingActiveException. -
clear
Description copied from interface:StyleRemoves all set style properties.This method silently clears all style signal bindings (unsubscribe and forget recorded values) in addition to clearing style values.
-
has
Description copied from interface:StyleChecks if the given style property has been set.Both camelCased (e.g.
fontFamily) and dash-separated (e.g.font-familyversions are supported. -
getNames
Description copied from interface:StyleGets the defined style property names.Note that this always returns the name as camelCased, e.g.
fontFamilyeven if it has been set as dash-separated (font-family).Includes names of the style properties bound with the signals while the element was in the attached state.
-
bind
Binds the given style property to the provided string signal and keeps the style property value synchronized with the signal.Passing
nullas thesignalremoves any existing binding for the given style property. When unbinding, the current presence of the style property is left unchanged.When a binding is in place, the style signal mirrors
signal.value(). If the signal value isnull, the style property is removed; otherwise it is set to the string value.The binding effect is active only while the owner element is in the attached state. While the owner is in the detached state, updates from the signal have no effect.
While a binding for a specific style name is active, any attempt to bind another signal for the same name throws a
BindingActiveException.Name handling follows the same rules as
Style.set(String, String): both camelCase and dash-separated names are supported and normalized in the same way.Immutable style implementation does not support binding a
Signalto a style property,
-