public class BasicElementStyle extends Object implements Style
Style
for BasicElementStateProvider
.
For internal use only. May be renamed or removed in a future release.
Constructor and Description |
---|
BasicElementStyle(ElementStylePropertyMap propertyMap)
Creates an instance connected to the given map.
|
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.
|
public BasicElementStyle(ElementStylePropertyMap propertyMap)
propertyMap
- the feature where the data is storedpublic Style set(String name, String value)
Style
Both camelCased (e.g. fontFamily
) and dash-separated (e.g.
font-family
versions are supported.
public Style remove(String name)
Style
Both camelCased (e.g. fontFamily
) and dash-separated (e.g.
font-family
versions are supported.
public Style clear()
Style
public String get(String name)
Style
Note that the name should be in camelCase and not dash-separated, i.e. use "fontFamily" and not "font-family"
public Stream<String> getNames()
Style
Note that this always returns the name as camelCased, e.g.
fontFamily
even if it has been set as dash-separated
(font-family
).
Copyright © 2025. All rights reserved.