com.vaadin.flow.dom.impl.
Class BasicElementStyle
- java.lang.Object
-
- com.vaadin.flow.dom.impl.BasicElementStyle
-
All Implemented Interfaces:
public class BasicElementStyle extends Object implements Style
Implementation of
Style
forBasicElementStateProvider
.For internal use only. May be renamed or removed in a future release.
Since:
1.0
Author:
Vaadin Ltd
See Also:
-
-
Constructor Summary
Constructors Constructor Description BasicElementStyle(ElementStylePropertyMap propertyMap)
Creates an instance connected to the given map.
-
Method Summary
All Methods Modifier and Type Method Description Style
clear()
Removes all set style properties.
String
get(String name)
Gets the value of the given style property.
Stream<String>
getNames()
Gets the defined style property names.
boolean
has(String name)
Checks if the given style property has been set.
Style
remove(String name)
Removes the given style property if it has been set.
Style
set(String name, String value)
Sets the given style property to the given value.
-
-
-
Constructor Detail
-
BasicElementStyle
public BasicElementStyle(ElementStylePropertyMap propertyMap)
Creates an instance connected to the given map.
Parameters:
propertyMap
- the feature where the data is stored
-
-
Method Detail
-
set
public Style set(String name, String value)
Description copied from interface:
Style
Sets the given style property to the given value.
Both camelCased (e.g.
fontFamily
) and dash-separated (e.g.font-family
versions are supported.
-
remove
public Style remove(String name)
Description copied from interface:
Style
Removes the given style property if it has been set.
Both camelCased (e.g.
fontFamily
) and dash-separated (e.g.font-family
versions are supported.
-
clear
public Style clear()
Description copied from interface:
Style
Removes all set style properties.
-
get
public String get(String name)
Description copied from interface:
Style
Gets 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"
-
getNames
public Stream<String> getNames()
Description copied from interface:
Style
Gets the defined style property names.
Note that this always returns the name as camelCased, e.g.
fontFamily
even if it has been set as dash-separated (font-family
).
-
-