public class ElementData extends NodeMap
Constructor and Description |
---|
ElementData(StateNode node)
Creates a new element data map for the given node.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowsChanges()
Returns
true if the underlying node may report its changes. |
elemental.json.JsonValue |
getPayload()
Gets the payload data of the element.
|
String |
getTag()
Gets the tag name of the element.
|
boolean |
isVisible()
Get element visibility.
|
void |
setPayload(elemental.json.JsonValue payload)
Sets the payload data of the element.
|
void |
setTag(String tag)
Sets the tag name of the element.
|
void |
setVisible(boolean visible)
Set the visibility of the element.
|
clear, collectChanges, contains, forEachChild, generateChangesFromEmpty, get, getOrDefault, getOrDefault, getOrDefault, keySet, mayUpdateFromClient, put, put, remove, updateFromClient
attachPotentialChild, detatchPotentialChild, getNode, onAttach, onDetach
public ElementData(StateNode node)
node
- the node that the map belongs topublic void setTag(String tag)
tag
- the tag namepublic String getTag()
public void setPayload(elemental.json.JsonValue payload)
payload
- the payload datapublic void setVisible(boolean visible)
visible
- is the element visible or hiddenpublic boolean isVisible()
public elemental.json.JsonValue getPayload()
public boolean allowsChanges()
NodeFeature
true
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.
allowsChanges
in class NodeFeature
true
if the feature allows changes for the node,
false
otherwiseStateNode.updateActiveState()
Copyright © 2019. All rights reserved.