01: /*
02: *
03: * Copyright (c) 2004 SourceTap - www.sourcetap.com
04: *
05: * The contents of this file are subject to the SourceTap Public License
06: * ("License"); You may not use this file except in compliance with the
07: * License. You may obtain a copy of the License at http://www.sourcetap.com/license.htm
08: * Software distributed under the License is distributed on an "AS IS" basis,
09: * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
10: * the specific language governing rights and limitations under the License.
11: *
12: * The above copyright notice and this permission notice shall be included
13: * in all copies or substantial portions of the Software.
14: *
15: */
16:
17: package com.sourcetap.sfa.ui;
18:
19: import java.io.Writer;
20:
21: import javax.swing.tree.MutableTreeNode;
22: import javax.swing.tree.TreeNode;
23:
24: /* an interface layer which will allow the swing components to be removed at some point */
25: public interface UITreeNode extends TreeNode, MutableTreeNode {
26: /* a few routines that are in DefaultMutableTreeNode that should be in the interface */
27: public void add(MutableTreeNode newChild);
28:
29: /**
30: * DOCUMENT ME!
31: *
32: * @return
33: */
34: public boolean isRoot();
35:
36: /**
37: * DOCUMENT ME!
38: *
39: * @return
40: */
41: public Object getUserObject();
42:
43: /* outputs the HTML necessary to render the node contents */
44: public void displayHtml(Writer out) throws java.io.IOException;
45:
46: /* can be overridden to display the contents of a node */
47: public String getDisplayText();
48: }
|