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:
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 Summary
All Methods Modifier and Type Method Description static StateNode
createStateNode(String text)
Creates a compatible text state node using the given text.
static BasicTextElementStateProvider
get()
Gets the one and only instance.
Node<?>
getParent(StateNode node)
Gets the parent element.
String
getTextContent(StateNode node)
Gets the text content.
protected Object
readResolve()
void
setTextContent(StateNode node, String textContent)
Sets the text content.
boolean
supports(StateNode node)
Checks 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, visit
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.flow.dom.ElementStateProvider
getComponent, setComponent
-
-
-
-
Method Detail
-
createStateNode
public static StateNode createStateNode(String text)
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
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 checkReturns:
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)
returnstrue
.Parameters:
node
- the node containing the dataReturns:
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)
returnstrue
.Parameters:
node
- the node containing the datatextContent
- 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 dataReturns:
the parent element or null if the element has no parent
-
readResolve
protected Object readResolve() throws ObjectStreamException
Throws:
-
-