KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jac > aspects > gui > TreeView


1 /*
2   Copyright (C) 2002 Renaud Pawlak, Laurent Martelli
3   
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU Lesser General Public License as
6   published by the Free Software Foundation; either version 2 of the
7   License, or (at your option) any later version.
8
9   This program is distributed in the hope that it will be useful, but
10   WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12   Lesser General Public License for more details.
13
14   You should have received a copy of the GNU Lesser General Public
15   License along with this program; if not, write to the Free Software
16   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
17   USA */

18
19 package org.objectweb.jac.aspects.gui;
20
21 import javax.swing.tree.TreeNode JavaDoc;
22 import javax.swing.tree.TreePath JavaDoc;
23
24 /**
25  * The GUI terget independant tree view. */

26
27 public interface TreeView {
28
29    /**
30     * Set the root node of the tree.
31     * @param root the root node
32     */

33    void setRootNode(AbstractNode root);
34
35    /**
36     * Add a child node to a node
37     * @param parent the node to add the child node to
38     * @param child the node to add
39     */

40    void addNode(AbstractNode parent, AbstractNode child);
41
42    /**
43     * Upcalled when a substance changed for a given node.
44     *
45     * @param node the node that changed
46     */

47    void nodeChanged(TreeNode JavaDoc node);
48
49    /**
50     * Upcalled when nodes where removed in this tree.
51     *
52     * @param node the parent node from where the nodes were removed
53     * @param indices the indices of the removed nodes
54     * @param removedNodes the removed nodes
55     */

56    void nodesWereRemoved(TreeNode JavaDoc node,int[] indices, Object JavaDoc[] removedNodes);
57
58    /**
59     * Upcalled when nodes where inserted in this tree.
60     *
61     * @param node the parent node from where the nodes were inserted
62     * @param indices the indices of the inserted nodes
63     */

64    void nodesWereInserted(TreeNode JavaDoc node,int[] indices);
65
66    /**
67     * Sets the selected node for this tree.
68     *
69     * @param selectionPath a tree path indicating the selected node
70     */

71    void setSelection(TreePath JavaDoc selectionPath);
72 }
73
Popular Tags