org.kde.koala
Class CustomNodeFilter

java.lang.Object
  extended by org.kde.koala.DomShared
      extended by org.kde.koala.CustomNodeFilter
All Implemented Interfaces:
org.kde.qt.QtSupport

public class CustomNodeFilter
extends DomShared

CustomNodeFilter can be used to define your own NodeFilter for use with NodeIterators and TreeWalkers. You can create a custom filter by doing the following: class MyCustomNodeFilter { ..... short acceptNode (Noden); ..... } Then in your program: short MyCustomNodeFilter.acceptNode (Noden) { if (condition) return NodeFilter.FILTER_ACCEPT; else .... } MyCustomFilter filter = new MyCustomFilter(); NodeFilter nf = NodeFilter.createCustom(filter); NodeIterator ni = document.createNodeIterator(document,NodeFilter.SHOW_ALL,nf,false); The default implementation of acceptNode() returns NodeFilter.FILTER_ACCEPT for all nodes.


Constructor Summary
  CustomNodeFilter()
           
protected CustomNodeFilter(java.lang.Class dummy)
           
 
Method Summary
 short acceptNode(Node n)
           
 java.lang.String customNodeFilterType()
          not part of the DOM Returns a name specifying the type of custom node filter.
 boolean isNull()
           
 
Methods inherited from class org.kde.koala.DomShared
deleteMe, deref, hasOneRef, ref, refCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomNodeFilter

protected CustomNodeFilter(java.lang.Class dummy)

CustomNodeFilter

public CustomNodeFilter()
Method Detail

acceptNode

public short acceptNode(Node n)

isNull

public boolean isNull()

customNodeFilterType

public java.lang.String customNodeFilterType()
not part of the DOM Returns a name specifying the type of custom node filter. Useful for checking if an custom node filter is of a particular sublass.