Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
IMutableTreeNode |
|
| 1.0;1 |
1 | // Copyright 2004, 2005 The Apache Software Foundation | |
2 | // | |
3 | // Licensed under the Apache License, Version 2.0 (the "License"); | |
4 | // you may not use this file except in compliance with the License. | |
5 | // You may obtain a copy of the License at | |
6 | // | |
7 | // http://www.apache.org/licenses/LICENSE-2.0 | |
8 | // | |
9 | // Unless required by applicable law or agreed to in writing, software | |
10 | // distributed under the License is distributed on an "AS IS" BASIS, | |
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
12 | // See the License for the specific language governing permissions and | |
13 | // limitations under the License. | |
14 | ||
15 | package org.apache.tapestry.contrib.tree.model; | |
16 | ||
17 | import java.util.Collection; | |
18 | ||
19 | /** | |
20 | * Defines the requirements for a tree node object that can change -- | |
21 | * by adding or removing child nodes, or by changing the contents | |
22 | * of a user object stored in the node. | |
23 | * | |
24 | * @see javax.swing.tree.DefaultMutableTreeNode | |
25 | * @see javax.swing.JTree | |
26 | * | |
27 | * @author ceco | |
28 | */ | |
29 | ||
30 | public interface IMutableTreeNode extends ITreeNode | |
31 | { | |
32 | /** | |
33 | * Adds collection of<code>children</code> to the receiver. | |
34 | * <code>Child</code> will be messaged with <code>setParent</code>. | |
35 | */ | |
36 | void insert(Collection colChildren); | |
37 | ||
38 | /** | |
39 | * Removes <code>node</code> from the receiver. <code>setParent</code> | |
40 | * will be messaged on <code>node</code>. | |
41 | */ | |
42 | void remove(IMutableTreeNode node); | |
43 | ||
44 | /** | |
45 | * Removes the receiver from its parent. | |
46 | */ | |
47 | void removeFromParent(); | |
48 | ||
49 | /** | |
50 | * Sets the parent of the receiver to <code>newParent</code>. | |
51 | */ | |
52 | void setParent(IMutableTreeNode newParent); | |
53 | } |