Class ElementStylePropertyMap
java.lang.Object
com.vaadin.flow.internal.nodefeature.NodeFeature
com.vaadin.flow.internal.nodefeature.NodeMap
com.vaadin.flow.internal.nodefeature.AbstractPropertyMap
com.vaadin.flow.internal.nodefeature.ElementStylePropertyMap
- All Implemented Interfaces:
Serializable
Map for element style values.
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 class com.vaadin.flow.internal.nodefeature.NodeMap
NodeMap.SignalBinding -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new element style map for the given node. -
Method Summary
Modifier and TypeMethodDescriptionprotected SerializableGets the value corresponding to the given key.getStyle()Returns a style instance for managing element inline styles.booleanhasProperty(String name) Checks whether there is a property of the given name.voidRemoves all properties.voidsetProperty(String name, Serializable value, boolean emitChange) Sets a property to the given value.voidsetPropertyFromSignal(String name, Object value) Applies a value coming from a signal to the property while preserving an existing binding.Methods inherited from class com.vaadin.flow.internal.nodefeature.AbstractPropertyMap
bindSignal, getProperty, getPropertyNames, isValidValueType, removeProperty, updateFromClientMethods inherited from class com.vaadin.flow.internal.nodefeature.NodeMap
bindSignal, clear, collectChanges, contains, forEachChild, generateChangesFromEmpty, getOrDefault, getOrDefault, getOrDefault, hasSignal, keySet, mayUpdateFromClient, producePutChange, put, put, removeMethods inherited from class com.vaadin.flow.internal.nodefeature.NodeFeature
allowsChanges, attachPotentialChild, detatchPotentialChild, getNode, onAttach, onDetach
-
Constructor Details
-
ElementStylePropertyMap
Creates a new element style map for the given node.- Parameters:
node- the node that the map belongs to
-
-
Method Details
-
setProperty
Description copied from class:AbstractPropertyMapSets a property to the given value.- Overrides:
setPropertyin classAbstractPropertyMap- Parameters:
name- the property namevalue- the value, must be a string, a boolean, a double ornullemitChange- true to create a change event for the client side
-
setPropertyFromSignal
Description copied from class:AbstractPropertyMapApplies a value coming from a signal to the property while preserving an existing binding.- Specified by:
setPropertyFromSignalin classAbstractPropertyMap- Parameters:
name- the property namevalue- the value to apply;nullremoves the property on the client but keeps the binding and last-applied value asnull
-
get
Description copied from class:NodeMapGets the value corresponding to the given key. -
removeAllProperties
public void removeAllProperties()Description copied from class:AbstractPropertyMapRemoves all properties.- Overrides:
removeAllPropertiesin classAbstractPropertyMap
-
hasProperty
Description copied from class:AbstractPropertyMapChecks whether there is a property of the given name.- Overrides:
hasPropertyin classAbstractPropertyMap- Parameters:
name- the name of the property- Returns:
trueif there is a property with the given name;falseif there is no property
-
getStyle
Returns a style instance for managing element inline styles.- Returns:
- a Style instance connected to this map
-