Class ElementData
java.lang.Object
com.vaadin.flow.internal.nodefeature.NodeFeature
com.vaadin.flow.internal.nodefeature.NodeMap
com.vaadin.flow.internal.nodefeature.ElementData
- All Implemented Interfaces:
Serializable
Map of basic element information.
For internal use only. May be renamed or removed in a future release.
- Since:
- 1.0
- Author:
- Vaadin Ltd
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionElementData(StateNode node) Creates a new element data map for the given node. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif the underlying node may report its changes.Gets the namespace of the element.com.fasterxml.jackson.databind.node.BaseJsonNodeGets the payload data of the element.getTag()Gets the tag name of the element.booleanGet element visibility.voidsetJavaClass(Class<? extends Component> componentClass) voidsetNamespace(String namespace) Sets the namespace of the element.voidsetPayload(com.fasterxml.jackson.databind.node.BaseJsonNode payload) Sets the payload data of the element.voidSets the tag name of the element.voidsetVisible(boolean visible) Set the visibility of the element.Methods inherited from class com.vaadin.flow.internal.nodefeature.NodeMap
clear, collectChanges, contains, forEachChild, generateChangesFromEmpty, get, getOrDefault, getOrDefault, getOrDefault, keySet, mayUpdateFromClient, producePutChange, put, put, remove, updateFromClientMethods inherited from class com.vaadin.flow.internal.nodefeature.NodeFeature
attachPotentialChild, detatchPotentialChild, getNode, onAttach, onDetach
-
Constructor Details
-
ElementData
Creates a new element data map for the given node.- Parameters:
node- the node that the map belongs to
-
-
Method Details
-
setTag
Sets the tag name of the element.- Parameters:
tag- the tag name
-
getTag
Gets the tag name of the element.- Returns:
- the tag name
-
setNamespace
Sets the namespace of the element. -
getNamespace
Gets the namespace of the element.- Returns:
- namespace
-
setPayload
public void setPayload(com.fasterxml.jackson.databind.node.BaseJsonNode payload) Sets the payload data of the element.- Parameters:
payload- the payload data
-
setVisible
public void setVisible(boolean visible) Set the visibility of the element.- Parameters:
visible- is the element visible or hidden
-
isVisible
public boolean isVisible()Get element visibility.- Returns:
- Element is visible by default
-
getPayload
public com.fasterxml.jackson.databind.node.BaseJsonNode getPayload()Gets the payload data of the element.- Returns:
- the payload data of the element
-
allowsChanges
public boolean allowsChanges()Description copied from class:NodeFeatureReturnstrueif the underlying node may report its changes.If its return value is
falsethen this node should be considered as "inactive" and should not send any changes to the client side at all or only changes for features that disallow the changes.Normally features don't control the node behavior so the default implementation returns
true. The feature which wants to control the node behavior should override this method.- Overrides:
allowsChangesin classNodeFeature- Returns:
trueif the feature allows changes for the node,falseotherwise- See Also:
-
setJavaClass
-
getJavaClass
-