com.vaadin.flow.dom.impl.

Class BasicTextElementStateProvider

java.lang.Object
com.vaadin.flow.dom.impl.AbstractTextElementStateProvider
com.vaadin.flow.dom.impl.BasicTextElementStateProvider

All Implemented Interfaces:

ElementStateProvider, Serializable

public class BasicTextElementStateProvider extends AbstractTextElementStateProvider

Handles storing and retrieval of the state information for a text node using a state node.

For internal use only. May be renamed or removed in a future release.

Since:

1.0

Author:

Vaadin Ltd

See Also:

  • Method Details

    • createStateNode

      public static StateNode createStateNode(String text)

      Creates a compatible text state node using the given text.

      Parameters:

      text - the text to use, not null

      Returns:

      a initialized and compatible state node

    • get

      public static BasicTextElementStateProvider get()

      Gets the one and only instance.

      Returns:

      the instance to use for all basic text nodes

    • supports

      public boolean supports(StateNode node)

      Description copied from interface: ElementStateProvider

      Checks if the element state provider supports the given state node.

      Parameters:

      node - the state node to check

      Returns:

      true if the element state provider is compatible with the given state node, false otherwise

    • getTextContent

      public String getTextContent(StateNode node)

      Description copied from interface: ElementStateProvider

      Gets the text content. This is only valid if ElementStateProvider.isTextNode(StateNode) returns true.

      Parameters:

      node - the node containing the data

      Returns:

      the text content

    • setTextContent

      public void setTextContent(StateNode node, String textContent)

      Description copied from interface: ElementStateProvider

      Sets the text content. This is only valid if ElementStateProvider.isTextNode(StateNode) returns true.

      Parameters:

      node - the node containing the data

      textContent - the text content, not null

    • getParent

      public Node<?> getParent(StateNode node)

      Description copied from interface: ElementStateProvider

      Gets the parent element.

      Parameters:

      node - the node containing the data

      Returns:

      the parent element or null if the element has no parent

    • readResolve

      protected Object readResolve() throws ObjectStreamException

      Throws:

      ObjectStreamException