Class TextImpl
- All Implemented Interfaces:
Cloneable
,EventTarget
,ModelNode
,CharacterData
,Node
,NonDocumentTypeChildNode
,Text
,ScriptableDelegate
- Direct Known Subclasses:
CDataSectionImpl
TextImpl class.
-
Field Summary
Fields inherited from class org.loboevolution.html.dom.nodeimpl.CharacterDataImpl
text
Fields inherited from class org.loboevolution.html.dom.nodeimpl.NodeImpl
document, nodeList, notificationsSuspended, parentNode, uiNode
Fields inherited from interface org.loboevolution.html.node.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NONE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionappendChild
(Node newChild) appendChild.getAssignedSlot.getLocalName.Returns a string appropriate for the type of node.int
Returns the type of node.getNodeValue.Returns the combined data of all direct Text node siblings.boolean
Returns true if element has attributes, and false otherwise.boolean
isElementContentWhitespace.replaceWholeText
(String content) replaceWholeText.void
setNodeValue
(String nodeValue) setNodeValue.void
setTextContent
(String textContent) setTextContent.splitText
(int offset) Splits data at the given offset and returns the remainder as Text node.toString()
Methods inherited from class org.loboevolution.html.dom.nodeimpl.CharacterDataImpl
appendData, deleteData, getClassName, getData, getLength, getTextContent, insertData, replaceData, setData, substringData
Methods inherited from class org.loboevolution.html.dom.nodeimpl.NodeImpl
appendInnerHTMLImpl, appendInnerTextImpl, clone, cloneNode, cloneNode, compareDocumentPosition, contains, createRenderState, findUINode, forgetRenderState, getATTRIBUTE_NODE, getAttributes, getBaseURI, getCDATA_SECTION_NODE, getChildIndex, getChildNodes, getChildren, getCOMMENT_NODE, getDescendents, getDOCUMENT_FRAGMENT_NODE, getDOCUMENT_NODE, getDOCUMENT_POSITION_CONTAINED_BY, getDOCUMENT_POSITION_CONTAINS, getDOCUMENT_POSITION_DISCONNECTED, getDOCUMENT_POSITION_FOLLOWING, getDOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, getDOCUMENT_POSITION_PRECEDING, getDOCUMENT_TYPE_NODE, getDocumentItem, getDocumentNode, getDocumentURL, getELEMENT_NODE, getENTITY_NODE, getENTITY_REFERENCE_NODE, getFeature, getFirstChild, getFirstChildByFilter, getFullURL, getHtmlRendererConfig, getHtmlRendererContext, getLastChild, getNamespaceURI, getNextElementSibling, getNextSibling, getNodeList, getNONE, getNOTATION_NODE, getOwnerDocument, getParentElement, getParentModelNode, getParentNode, getParentRenderState, getPrefix, getPreviousElementSibling, getPreviousSibling, getPROCESSING_INSTRUCTION_NODE, getRenderState, getRootNode, getTEXT_NODE, getUINode, getUserAgentContext, getUserData, hasChildNodes, htmlEncodeChildText, informInvalid, informLayoutInvalid, informLookInvalid, informNodeLoaded, informPositionInvalid, informSizeInvalid, informStructureInvalid, insertAfter, insertAt, insertBefore, isDefaultNamespace, isEqualNode, isEqualOrDescendentOf, isIsConnected, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, prepend, prependChild, removeChild, removeChildAt, removeChildrenImpl, removeTableChildren, replaceAdjacentTextNodes, replaceChild, setDocumentItem, setOwnerDocument, setOwnerDocument, setParentImpl, setPrefix, setUINode, setUserData, visit, visitImpl, warn, warn
Methods inherited from class org.loboevolution.html.dom.nodeimpl.event.EventTargetImpl
addEventListener, addEventListener, dispatchEvent, dispatchEvent, getFunction, removeEventListener, removeEventListener
Methods inherited from class org.loboevolution.js.AbstractScriptableDelegate
getScriptable, setScriptable
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.loboevolution.html.node.CharacterData
appendData, deleteData, getData, getLength, insertData, replaceData, setData, substringData
Methods inherited from interface org.loboevolution.events.EventTarget
addEventListener, addEventListener, dispatchEvent, dispatchEvent, removeEventListener, removeEventListener
Methods inherited from interface org.loboevolution.html.node.Node
cloneNode, cloneNode, compareDocumentPosition, contains, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getNamespaceURI, getNextSibling, getOwnerDocument, getParentElement, getParentNode, getPrefix, getPreviousSibling, getRootNode, getTextContent, getUserData, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isIsConnected, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, prepend, prependChild, removeChild, replaceChild, setOwnerDocument, setPrefix, setUserData
Methods inherited from interface org.loboevolution.html.node.NonDocumentTypeChildNode
getNextElementSibling, getPreviousElementSibling
-
Constructor Details
-
TextImpl
public TextImpl()Constructor for TextImpl.
-
TextImpl
Constructor for TextImpl.
- Parameters:
text
- aString
object.
-
-
Method Details
-
appendChild
Description copied from class:NodeImpl
appendChild.
- Specified by:
appendChild
in interfaceNode
- Overrides:
appendChild
in classNodeImpl
- Parameters:
newChild
- aNode
object.- Returns:
- a
Node
object.
-
getLocalName
getLocalName.
- Specified by:
getLocalName
in interfaceNode
- Specified by:
getLocalName
in classNodeImpl
- Returns:
- a
String
object.
-
getNodeName
Returns a string appropriate for the type of node.- Specified by:
getNodeName
in interfaceNode
- Specified by:
getNodeName
in classNodeImpl
- Returns:
- a
String
object.
-
getNodeType
public int getNodeType()Returns the type of node.- Specified by:
getNodeType
in interfaceNode
- Specified by:
getNodeType
in classNodeImpl
- Returns:
- a
Integer
object.
-
getNodeValue
getNodeValue.
- Specified by:
getNodeValue
in interfaceNode
- Specified by:
getNodeValue
in classNodeImpl
- Returns:
- a
String
object.
-
getWholeText
Returns the combined data of all direct Text node siblings.- Specified by:
getWholeText
in interfaceText
- Returns:
- a
String
object.
-
isElementContentWhitespace
public boolean isElementContentWhitespace()isElementContentWhitespace.
- Specified by:
isElementContentWhitespace
in interfaceText
- Returns:
- a boolean.
-
replaceWholeText
replaceWholeText.
- Specified by:
replaceWholeText
in interfaceText
- Parameters:
content
- aString
object.- Returns:
- a
Text
object.
-
setNodeValue
setNodeValue.
- Specified by:
setNodeValue
in interfaceNode
- Specified by:
setNodeValue
in classNodeImpl
- Parameters:
nodeValue
- aString
object.
-
setTextContent
setTextContent.
- Specified by:
setTextContent
in interfaceNode
- Overrides:
setTextContent
in classCharacterDataImpl
- Parameters:
textContent
- aString
object.
-
splitText
Splits data at the given offset and returns the remainder as Text node. -
getAssignedSlot
getAssignedSlot.
- Specified by:
getAssignedSlot
in interfaceText
- Returns:
- a
HTMLSlotElement
object.
-
hasAttributes
public boolean hasAttributes()Description copied from interface:Node
Returns true if element has attributes, and false otherwise.- Specified by:
hasAttributes
in interfaceNode
- Returns:
- a boolean.
-
toString
- Overrides:
toString
in classCharacterDataImpl
-