KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > tasklist > docscan > SourceTaskNode


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.tasklist.docscan;
21
22 import java.util.List JavaDoc;
23 import java.util.ArrayList JavaDoc;
24 import java.awt.datatransfer.Transferable JavaDoc;
25
26 import javax.swing.*;
27
28 import org.openide.util.actions.SystemAction;
29 import org.openide.util.NbBundle;
30 import org.openide.nodes.Node;
31 import org.openide.nodes.AbstractNode;
32 import org.openide.nodes.Sheet;
33 import org.openide.nodes.Children;
34 import org.openide.nodes.PropertySupport;
35 import org.openide.actions.PropertiesAction;
36 import org.openide.ErrorManager;
37 import org.openide.loaders.DataObject;
38 import org.openide.text.Line;
39 import org.openide.text.DataEditorSupport;
40
41 import org.netbeans.modules.tasklist.client.SuggestionPriority;
42 import org.netbeans.modules.tasklist.client.Suggestion;
43
44 import org.netbeans.modules.tasklist.suggestions.*;
45 import org.netbeans.modules.tasklist.core.filter.FilterAction;
46 import org.netbeans.modules.tasklist.core.*;
47 import org.netbeans.modules.tasklist.core.editors.PriorityPropertyEditor;
48 import org.netbeans.modules.tasklist.core.editors.LineNumberPropertyEditor;
49
50 /**
51  * Represents one scanned source task as a Node with
52  * actions, cookies, properties, clipboard operations and
53  * children (at root represents all tasks in list).
54  *
55  * @author Petr Kuzel
56  */

57 class SourceTaskNode extends SuggestionNode {
58
59     public SourceTaskNode(SuggestionImpl rootItem) {
60       super(rootItem, Children.LEAF);
61     }
62
63
64     public SourceTaskNode(SuggestionImpl rootItem, Children children) {
65       super(rootItem, children);
66     }
67
68     public Node cloneNode () {
69       SourceTaskNode clon = new SourceTaskNode((SuggestionImpl)this.item);
70       if (!clon.isLeaf())
71     clon.setChildren((Children)getTaskChildren().clone());
72       return clon;
73     }
74
75     protected TaskChildren createChildren() {
76       return new SourceTaskChildren((SuggestionImpl)this.item);
77     }
78
79     public Action[] getActions(boolean context) {
80         return new Action[] {
81             SystemAction.get(ShowSuggestionAction.class)
82         };
83     }
84
85 // public String getDisplayName() {
86
// return Util.getString("task-col"); // see TreeTableModelAdapter.getColumnName(int column)
87
// }
88

89 // public String getShortDescription() {
90
// return Util.getString("TODOHint");
91
// }
92

93     
94 }
95
96
Popular Tags