Package com.storedobject.svg
Class Styles
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,String>
The Styles class extends HashMap and provides functionality for constructing
CSS style definitions. Each entry in the map represents a CSS property and its value.
- Author:
- Syam
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
Styles
public Styles()Creates a new instance of the Styles class, which extends HashMap. This constructor initializes an empty map that will hold CSS property-value pairs for style definitions.
-
-
Method Details
-
set
-
build
Constructs a CSS style block for an element represented by a given ID. The method appends the CSS properties and their respective values stored in the current instance to the provided StringBuilder object, using the specified ID to define the block selector.- Parameters:
sb- the StringBuilder to which the CSS style block will be appendedid- the identifier of the CSS element for which the style block will be built
-