Package mf.org.w3c.dom

Examples of mf.org.w3c.dom.Node


    /** Return the previous Node from the current node,
     *  after applying filter, whatToshow.
     *  If result is not null, set the current Node.
     */
    public Node               previousNode() {
        Node result;
       
        if (fCurrentNode == null) return null;
       
        // get sibling
        result = getPreviousSibling(fCurrentNode);
        if (result == null) {
            result = getParentNode(fCurrentNode);
            if (result != null) {
                fCurrentNode = result;
                return fCurrentNode;
            }
            return null;
        }
       
        // get the lastChild of result.
        Node lastChild  = getLastChild(result);
       
        Node prev = lastChild ;
        while (lastChild != null) {
          prev = lastChild ;
          lastChild = getLastChild(prev) ;
        }

View Full Code Here


     */
    public Node               nextNode() {
       
        if (fCurrentNode == null) return null;
       
        Node result = getFirstChild(fCurrentNode);
       
        if (result != null) {
            fCurrentNode = result;
            return result;
        }
       
        result = getNextSibling(fCurrentNode);
       
        if (result != null) {
            fCurrentNode = result;
            return result;
        }
               
        // return parent's 1st sibling.
        Node parent = getParentNode(fCurrentNode);
        while (parent != null) {
            result = getNextSibling(parent);
            if (result != null) {
                fCurrentNode = result;
                return result;
View Full Code Here

     */
    Node getParentNode(Node node) {
       
        if (node == null || isSameNode(node, fRoot)) return null;
       
        Node newNode = node.getParentNode();
        if (newNode == nullreturn null;
                       
        int accept = acceptNode(newNode);
       
        if (accept == NodeFilter.FILTER_ACCEPT)
View Full Code Here

     */
    Node getNextSibling(Node node, Node root) {
       
        if (node == null || isSameNode(node, root)) return null;
       
        Node newNode = node.getNextSibling();
        if (newNode == null) {
               
            newNode = node.getParentNode();
               
            if (newNode == null || isSameNode(newNode, root)) return null;
               
            int parentAccept = acceptNode(newNode);
               
            if (parentAccept==NodeFilter.FILTER_SKIP) {
                return getNextSibling(newNode, root);
            }
               
            return null;
        }
       
        int accept = acceptNode(newNode);
       
        if (accept == NodeFilter.FILTER_ACCEPT)
            return newNode;
        else
        if (accept == NodeFilter.FILTER_SKIP) {
            Node fChild = getFirstChild(newNode);
            if (fChild == null) {
                return getNextSibling(newNode, root);
            }
            return fChild;
        }
View Full Code Here

     */
    Node getPreviousSibling(Node node, Node root) {
       
        if (node == null || isSameNode(node, root)) return null;
       
        Node newNode = node.getPreviousSibling();
        if (newNode == null) {
               
            newNode = node.getParentNode();
            if (newNode == null || isSameNode(newNode, root)) return null;
               
            int parentAccept = acceptNode(newNode);
               
            if (parentAccept==NodeFilter.FILTER_SKIP) {
                return getPreviousSibling(newNode, root);
            }
           
            return null;
        }
       
        int accept = acceptNode(newNode);
       
        if (accept == NodeFilter.FILTER_ACCEPT)
            return newNode;
        else
        if (accept == NodeFilter.FILTER_SKIP) {
            Node fChild =  getLastChild(newNode);
            if (fChild == null) {
                return getPreviousSibling(newNode, root);
            }
            return fChild;
        }
View Full Code Here

        if (node == null) return null;
       
        if ( !fEntityReferenceExpansion
             && node.getNodeType() == Node.ENTITY_REFERENCE_NODE)
            return null;
        Node newNode = node.getFirstChild();
        if (newNode == nullreturn null;
        int accept = acceptNode(newNode);
       
        if (accept == NodeFilter.FILTER_ACCEPT)
            return newNode;
        else
        if (accept == NodeFilter.FILTER_SKIP
            && newNode.hasChildNodes())
        {
            Node fChild = getFirstChild(newNode);
           
            if (fChild == null) {
                return getNextSibling(newNode, node);
            }
            return fChild;
View Full Code Here

       
        if ( !fEntityReferenceExpansion
             && node.getNodeType() == Node.ENTITY_REFERENCE_NODE)
            return null;
           
        Node newNode = node.getLastChild();
        if (newNode == nullreturn null;
       
        int accept = acceptNode(newNode);
       
        if (accept == NodeFilter.FILTER_ACCEPT)
            return newNode;
        else
        if (accept == NodeFilter.FILTER_SKIP
            && newNode.hasChildNodes())
        {
            Node lChild = getLastChild(newNode);
            if (lChild == null) {
                return getPreviousSibling(newNode, node);
            }
            return lChild;
        }
View Full Code Here

    private static final long serialVersionUID = 5409562635656244263L;

    public int getRowIndex()
    {
        Node    parent;
       
        parent = getParentNode();
        if ( parent instanceof HTMLTableSectionElement ) {
            parent = parent.getParentNode();
        }
        if ( parent instanceof HTMLTableElement ) {
            return getRowIndex( parent );
        }
        return -1;
View Full Code Here

    }
   
   
    public void setRowIndex( int rowIndex )
    {
        Node    parent;
       
        parent = getParentNode();
        if ( parent instanceof HTMLTableSectionElement ) {
            parent = parent.getParentNode();
        }
        if ( parent instanceof HTMLTableElement ) {
            ( (HTMLTableElementImpl) parent ).insertRowX( rowIndex, this );
        }
    }
View Full Code Here

    }

 
    public int getSectionRowIndex()
    {
        Node    parent;
       
        parent = getParentNode();
        if ( parent instanceof HTMLTableSectionElement ) {
            return getRowIndex( parent );
        }
View Full Code Here

TOP

Related Classes of mf.org.w3c.dom.Node

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.