JavaScript is disabled on your browser.
Skip navigation links
org.htmlunit.html

Class DomText

    • Constructor Detail

      • DomText

        public DomText(SgmlPage page,
         String data)
        Creates an instance of DomText.
        Parameters:
        page - the Page that contains this element
        data - the string data held by this node
    • Method Detail

      • createSplitTextNode

        protected DomText createSplitTextNode(int offset)
        Creates a new text node split from another text node. This method allows the derived type of the new text node to match the original node type.
        Parameters:
        offset - the character position at which to split the DomText node
        Returns:
        the newly created Text node
      • isElementContentWhitespace

        public boolean isElementContentWhitespace()
        Not yet implemented.
        Specified by:
        isElementContentWhitespace in interface Text
      • getNodeType

        public short getNodeType()
        Specified by:
        getNodeType in interface Node
        Returns:
        the node type constant, in this case Node.TEXT_NODE
      • printXml

        protected boolean printXml(String indent,
         boolean tagBefore,
         PrintWriter printWriter)
        Recursively writes the XML data for the node tree starting at node.
        Overrides:
        printXml in class DomNode
        Parameters:
        indent - white space to indent child nodes
        tagBefore - true if the last thing printed was a tag
        printWriter - writer where child nodes are written
        Returns:
        true if the last thing printed was a tag
      • toString

        public String toString()
        Gives a simple representation to facilitate debugging.
        Overrides:
        toString in class Object
        Returns:
        a simple representation
      • doType

        protected void doType(char c,
         HtmlElement htmlElement,
         boolean lastType)
        Performs the effective type action, called after the keyPress event and before the keyUp event.
        Parameters:
        c - the character you with to simulate typing
        htmlElement - the element in which typing occurs
        lastType - is this the last character to type
      • doType

        protected void doType(int keyCode,
         HtmlElement htmlElement,
         boolean lastType)
        Performs the effective type action, called after the keyPress event and before the keyUp event.
        Parameters:
        keyCode - the key code wish to simulate typing
        htmlElement - the element in which typing occurs
        lastType - is this the last character to type
      • acceptChar

        protected boolean acceptChar(char c)
        Indicates if the provided character can by "typed" in the element.
        Parameters:
        c - the character
        Returns:
        true if it is accepted
      • moveSelectionToEnd

        public void moveSelectionToEnd()
        Moves the selection to the end.
Skip navigation links

Copyright © 2002–2025 Gargoyle Software Inc.. All rights reserved.

AltStyle によって変換されたページ (->オリジナル) /