Package 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
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 Summary
Modifier and TypeMethodDescriptionstatic StateNodecreateStateNode(String text) Creates a compatible text state node using the given text.get()Gets the one and only instance.Node<?> Gets the parent element.getTextContent(StateNode node) Gets the text content.protected ObjectvoidsetTextContent(StateNode node, String textContent) Sets the text content.booleanChecks if the element state provider supports the given state node.Methods inherited from class com.vaadin.flow.dom.impl.AbstractTextElementStateProvider
addEventListener, addPropertyChangeListener, appendVirtualChild, attachExistingElement, attachShadow, getAttribute, getAttributeNames, getChild, getChildCount, getClassList, getProperty, getPropertyNames, getShadowRoot, getStyle, getTag, hasAttribute, hasProperty, insertChild, isTextNode, isVisible, removeAllChildren, removeAttribute, removeChild, removeChild, removeProperty, setAttribute, setAttribute, setProperty, setVisible, visitMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.dom.ElementStateProvider
getComponent, setComponent
-
Method Details
-
createStateNode
Creates a compatible text state node using the given text.- Parameters:
text- the text to use, notnull- Returns:
- a initialized and compatible state node
-
get
Gets the one and only instance.- Returns:
- the instance to use for all basic text nodes
-
supports
Description copied from interface:ElementStateProviderChecks 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
Description copied from interface:ElementStateProviderGets the text content. This is only valid ifElementStateProvider.isTextNode(StateNode)returnstrue.- Parameters:
node- the node containing the data- Returns:
- the text content
-
setTextContent
Description copied from interface:ElementStateProviderSets the text content. This is only valid ifElementStateProvider.isTextNode(StateNode)returnstrue.- Parameters:
node- the node containing the datatextContent- the text content, not null
-
getParent
Description copied from interface:ElementStateProviderGets the parent element.- Parameters:
node- the node containing the data- Returns:
- the parent element or null if the element has no parent
-
readResolve
- Throws:
ObjectStreamException
-