All Downloads are FREE. Search and download functionalities are using the official Maven repository.

elemental.traversal.NodeFilter Maven / Gradle / Ivy

Go to download

Vaadin is a web application framework for Rich Internet Applications (RIA). Vaadin enables easy development and maintenance of fast and secure rich web applications with a stunning look and feel and a wide browser support. It features a server-side architecture with the majority of the logic running on the server. Ajax technology is used at the browser-side to ensure a rich and interactive user experience.

There is a newer version: 8.26.0
Show newest version
/*
 * Copyright 2012 Google Inc.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package elemental.traversal;
import elemental.dom.Node;

import elemental.events.*;
import elemental.util.*;
import elemental.dom.*;
import elemental.html.*;
import elemental.css.*;
import elemental.stylesheets.*;

import java.util.Date;

/**
  * 
  */
public interface NodeFilter {

  /**
    * Value returned by the NodeFilter.acceptNode()
 method when a node should be accepted.
    */

    static final short FILTER_ACCEPT = 1;

  /**
    * Value to be returned by the NodeFilter.acceptNode()
 method when a node should be rejected. The children of rejected nodes are not visited by the NodeIterator
 or TreeWalker
 object; this value is treated as "skip this node and all its children".
    */

    static final short FILTER_REJECT = 2;

  /**
    * Value to be returned by NodeFilter.acceptNode()
 for nodes to be skipped by the NodeIterator
 or TreeWalker
 object. The children of skipped nodes are still considered. This is treated as "skip this node but not its children".
    */

    static final short FILTER_SKIP = 3;

  /**
    * Shows all nodes.
    */

    static final int SHOW_ALL = 0xFFFFFFFF;

  /**
    * Shows attribute Attr
 nodes. This is meaningful only when creating a NodeIterator
 or TreeWalker
 with an Attr
 node as its root; in this case, it means that the attribute node will appear in the first position of the iteration or traversal. Since attributes are never children of other nodes, they do not appear when traversing over the document tree.
    */

    static final int SHOW_ATTRIBUTE = 0x00000002;

  /**
    * Shows CDATASection
 nodes.
    */

    static final int SHOW_CDATA_SECTION = 0x00000008;

  /**
    * Shows Comment
 nodes.
    */

    static final int SHOW_COMMENT = 0x00000080;

  /**
    * Shows Document
 nodes.
    */

    static final int SHOW_DOCUMENT = 0x00000100;

  /**
    * Shows DocumentFragment
 nodes.
    */

    static final int SHOW_DOCUMENT_FRAGMENT = 0x00000400;

  /**
    * Shows DocumentType
 nodes.
    */

    static final int SHOW_DOCUMENT_TYPE = 0x00000200;

  /**
    * Shows Element
 nodes.
    */

    static final int SHOW_ELEMENT = 0x00000001;

  /**
    * Shows Entity
 nodes. This is meaningful only when creating a NodeIterator
 or TreeWalker
 with an Entity
 node as its root; in this case, it means that the Entity
 node will appear in the first position of the traversal. Since entities are not part of the document tree, they do not appear when traversing over the document tree.
    */

    static final int SHOW_ENTITY = 0x00000020;

  /**
    * Shows EntityReference
 nodes.
    */

    static final int SHOW_ENTITY_REFERENCE = 0x00000010;

  /**
    * Shows Notation
 nodes. This is meaningful only when creating a NodeIterator
 or TreeWalker
 with a Notation
 node as its root; in this case, it means that the Notation
 node will appear in the first position of the traversal. Since entities are not part of the document tree, they do not appear when traversing over the document tree.
    */

    static final int SHOW_NOTATION = 0x00000800;

  /**
    * Shows ProcessingInstruction
 nodes.
    */

    static final int SHOW_PROCESSING_INSTRUCTION = 0x00000040;

  /**
    * Shows Text
 nodes.
    */

    static final int SHOW_TEXT = 0x00000004;


  /**
    * The accept node method used by the filter is supplied as an object property when constructing the NodeIterator
 or TreeWalker
.
    */
  short acceptNode(Node n);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy