public interface Style extends Serializable
Element
s.Modifier and Type | Method and 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.
|
String get(String name)
Note that the name should be in camelCase and not dash-separated, i.e. use "fontFamily" and not "font-family"
name
- the style property name as camelCase, not null
null
if the style
property has not been setStyle set(String name, String value)
Both camelCased (e.g. fontFamily
) and dash-separated (e.g.
font-family
versions are supported.
name
- the style property name as camelCase, not null
value
- the style property value (if null
, the property
will be removed)Style remove(String name)
Both camelCased (e.g. fontFamily
) and dash-separated (e.g.
font-family
versions are supported.
name
- the style property name as camelCase, not null
Style clear()
boolean has(String name)
Both camelCased (e.g. fontFamily
) and dash-separated (e.g.
font-family
versions are supported.
name
- the style property name as camelCase, not null
true
if the style property has been set,
false
otherwiseCopyright © 2019. All rights reserved.