KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > tasklist > usertasks > UTListDependenciesTreeTableNode


1 package org.netbeans.modules.tasklist.usertasks;
2
3 import java.util.Comparator JavaDoc;
4 import java.util.Iterator JavaDoc;
5 import org.netbeans.modules.tasklist.usertasks.treetable.AdvancedTreeTableNode;
6 import org.netbeans.modules.tasklist.usertasks.treetable.FilterIntf;
7 import org.openide.util.NbBundle;
8 import org.netbeans.modules.tasklist.core.util.ObjectList;
9 import org.netbeans.modules.tasklist.core.util.ObjectListListener;
10 import org.netbeans.modules.tasklist.usertasks.model.UserTask;
11 import org.netbeans.modules.tasklist.usertasks.model.UserTaskList;
12
13 /**
14  * Task node
15  */

16 public class UTListDependenciesTreeTableNode extends UserTaskListTreeTableNode {
17     private ObjectListListener tl;
18     
19     /**
20      * Creates a new instance of UserTaskTreeTableNode
21      *
22      * @param filter filter to be used or null
23      * @param ut a user task list
24      * @param m model for this node
25      * @param comparator comparator to be used or null
26      */

27     public UTListDependenciesTreeTableNode(FilterIntf filter,
28     UserTasksTreeTableModel m, UserTaskList ut,
29             Comparator JavaDoc<AdvancedTreeTableNode> comparator) {
30         super(filter, m, ut, comparator);
31     }
32     
33     public AdvancedTreeTableNode createChildNode(Object JavaDoc child) {
34         UTDependenciesTreeTableNode n = new UTDependenciesTreeTableNode(
35             this, filter, (UserTasksTreeTableModel) model,
36             (UserTask) child, comparator);
37         if (getFilter() != null && !getFilter().accept(child))
38             n.setUnmatched(true);
39         return n;
40     }
41     
42     public boolean accept(Object JavaDoc child) {
43         if (getFilter() == null)
44             return true;
45         
46         return UTDependenciesTreeTableNode.acceptsRecursivelyDep(
47             (UserTask) child, getFilter());
48     }
49
50     public Iterator JavaDoc getChildrenObjectsIterator() {
51         return getUserTaskList().getAllSubtasks().iterator();
52     }
53 }
54
Popular Tags