blob: 7065e5d044b4bc7643f4989171bfda414a7eae37 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
//Auto-generated by kalyptus. DO NOT EDIT.
package org.trinitydesktop.koala;
import org.trinitydesktop.qt.Qt;
import org.trinitydesktop.qt.QtSupport;
/**
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.
@short CustomNodeFilter can be used to define your own NodeFilter for use with NodeIterators and TreeWalkers.
*/
public class CustomNodeFilter extends DomShared {
protected CustomNodeFilter(Class dummy){super((Class) null);}
public CustomNodeFilter() {
super((Class) null);
newCustomNodeFilter();
}
private native void newCustomNodeFilter();
public native short acceptNode(Node n);
public native boolean isNull();
/**
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.
@short
*/
public native String customNodeFilterType();
}
|