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 TypeMethodDescriptionboolean
Returnstrue
if the underlying node may report its changes.elemental.json.JsonValue
Gets the payload data of the element.getTag()
Gets the tag name of the element.boolean
Get element visibility.void
setJavaClass
(Class<? extends Component> componentClass) void
setPayload
(elemental.json.JsonValue payload) Sets the payload data of the element.void
Sets the tag name of the element.void
setVisible
(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, updateFromClient
Methods 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
-
setPayload
public void setPayload(elemental.json.JsonValue 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 elemental.json.JsonValue getPayload()Gets the payload data of the element.- Returns:
- the payload data of the element
-
allowsChanges
public boolean allowsChanges()Description copied from class:NodeFeature
Returnstrue
if the underlying node may report its changes.If its return value is
false
then 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:
allowsChanges
in classNodeFeature
- Returns:
true
if the feature allows changes for the node,false
otherwise- See Also:
-
setJavaClass
-
getJavaClass
-