Class ElementData

  • All Implemented Interfaces:
    Serializable

    public class ElementData
    extends NodeMap
    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:
    Serialized Form
    • Constructor Detail

      • ElementData

        public ElementData​(StateNode node)
        Creates a new element data map for the given node.
        Parameters:
        node - the node that the map belongs to
    • Method Detail

      • setTag

        public void setTag​(String tag)
        Sets the tag name of the element.
        Parameters:
        tag - the tag name
      • getTag

        public String 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
        Returns 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.

        Overrides:
        allowsChanges in class NodeFeature
        Returns:
        true if the feature allows changes for the node, false otherwise
        See Also:
        StateNode.updateActiveState()