public abstract class AbstractNodeStateProvider extends Object implements ElementStateProvider
ElementStateProvider related to the
composition essence of the provider.
For internal use only. May be renamed or removed in a future release.
| Constructor and Description |
|---|
AbstractNodeStateProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
appendVirtualChild(StateNode node,
Element child,
String type,
String payload)
Append the given element as a virtual child.
|
void |
attachExistingElement(StateNode node,
String tagName,
Element previousSibling,
ChildElementConsumer callback)
Attaches a child element with the given
tagName which is the next
sibling for the previousSibling. |
Element |
getChild(StateNode node,
int index)
Returns the child element at the given position.
|
int |
getChildCount(StateNode node)
Gets the number of child elements.
|
protected abstract Node<?> |
getNode(StateNode node)
Gets the flyweight instance for the
node supported by the
provider. |
Node |
getParent(StateNode node)
Gets the parent element.
|
protected abstract Class<? extends NodeFeature>[] |
getProviderFeatures()
Returns the features supported by the provider.
|
void |
insertChild(StateNode node,
int index,
Element child)
Inserts the given child at the given position.
|
void |
removeAllChildren(StateNode node)
Removes all child elements.
|
void |
removeChild(StateNode node,
Element child)
Removes the given child.
|
void |
removeChild(StateNode node,
int index)
Removes the child at the given position.
|
boolean |
supports(StateNode node)
Checks if the element state provider supports the given state node.
|
protected void |
visitDescendants(Node<?> node,
NodeVisitor visitor)
Apply the
visitor for the descendants of the node. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddEventListener, addPropertyChangeListener, addSynchronizedProperty, attachShadow, getAttribute, getAttributeNames, getClassList, getComponent, getProperty, getPropertyNames, getShadowRoot, getStyle, getSynchronizedProperties, getSynchronizedPropertyEvents, getTag, getTextContent, hasAttribute, hasProperty, isTextNode, isVisible, removeAttribute, removeProperty, setAttribute, setAttribute, setComponent, setProperty, setTextContent, setVisible, visitpublic boolean supports(StateNode node)
ElementStateProvidersupports in interface ElementStateProvidernode - the state node to checkprotected abstract Class<? extends NodeFeature>[] getProviderFeatures()
public Node getParent(StateNode node)
ElementStateProvidergetParent in interface ElementStateProvidernode - the node containing the datapublic int getChildCount(StateNode node)
ElementStateProvidergetChildCount in interface ElementStateProvidernode - the node containing the datapublic Element getChild(StateNode node, int index)
ElementStateProvidergetChild in interface ElementStateProvidernode - the node containing the dataindex - the index of the child element to returnpublic void insertChild(StateNode node, int index, Element child)
ElementStateProviderinsertChild in interface ElementStateProvidernode - the node containing the dataindex - the position at which to insert the new childchild - the child element to insertpublic void removeChild(StateNode node, int index)
ElementStateProviderremoveChild in interface ElementStateProvidernode - the node containing the dataindex - the position of the child element to removepublic void removeAllChildren(StateNode node)
ElementStateProviderremoveAllChildren in interface ElementStateProvidernode - the node containing the datapublic void removeChild(StateNode node, Element child)
ElementStateProviderremoveChild in interface ElementStateProvidernode - the node containing the datachild - the child element to removepublic void attachExistingElement(StateNode node, String tagName, Element previousSibling, ChildElementConsumer callback)
ElementStateProvidertagName which is the next
sibling for the previousSibling.
The previousSibling parameter value can be null which
means that the very first child with the given tagName will be
used to attach (if any).
attachExistingElement in interface ElementStateProvidernode - the parent nodetagName - the tag name of the element to attach, not nullpreviousSibling - previous sibling, may be nullcallback - the callback which will be invoked with a server side element
instance or an error will be reported, not nullpublic void appendVirtualChild(StateNode node, Element child, String type, String payload)
ElementStateProviderappendVirtualChild in interface ElementStateProvidernode - the node containing the datachild - the child element to addtype - the type of additional payload datapayload - the additional payload dataprotected void visitDescendants(Node<?> node, NodeVisitor visitor)
visitor for the descendants of the node.node - the node whose descendants are targets to apply the visitorvisitor - the visitor to applyprotected abstract Node<?> getNode(StateNode node)
node supported by the
provider.node - the node to wrap into flyweightnodesupports(StateNode)Copyright © 2021. All rights reserved.