author | malenkov |
Wed, 30 Apr 2014 19:28:05 +0400 | |
changeset 24544 | c0133e7c7162 |
parent 23010 | 6dadb192ad81 |
child 25154 | a4252397d312 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
23010
6dadb192ad81
8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
lana
parents:
21982
diff
changeset
|
2 |
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
2 | 24 |
*/ |
25 |
||
26 |
package javax.swing.event; |
|
27 |
||
28 |
import java.util.EventListener; |
|
29 |
||
30 |
/** |
|
31 |
* Defines the interface for an object that listens |
|
32 |
* to changes in a TreeModel. |
|
33 |
* For further information and examples see |
|
34 |
* <a |
|
20455
f6f9a0c2796b
8020688: Broken links in documentation at http://docs.oracle.com/javase/6/docs/api/index.
mcherkas
parents:
5506
diff
changeset
|
35 |
href="http://docs.oracle.com/javase/tutorial/uiswing/events/treemodellistener.html">How to Write a Tree Model Listener</a>, |
2 | 36 |
* a section in <em>The Java Tutorial.</em> |
37 |
* |
|
38 |
* @author Rob Davis |
|
39 |
* @author Ray Ryan |
|
40 |
*/ |
|
41 |
public interface TreeModelListener extends EventListener { |
|
42 |
||
43 |
/** |
|
44 |
* <p>Invoked after a node (or a set of siblings) has changed in some |
|
45 |
* way. The node(s) have not changed locations in the tree or |
|
46 |
* altered their children arrays, but other attributes have |
|
47 |
* changed and may affect presentation. Example: the name of a |
|
48 |
* file has changed, but it is in the same location in the file |
|
49 |
* system.</p> |
|
50 |
* <p>To indicate the root has changed, childIndices and children |
|
51 |
* will be null. </p> |
|
52 |
* |
|
53 |
* <p>Use <code>e.getPath()</code> |
|
54 |
* to get the parent of the changed node(s). |
|
55 |
* <code>e.getChildIndices()</code> |
|
56 |
* returns the index(es) of the changed node(s).</p> |
|
57 |
*/ |
|
58 |
void treeNodesChanged(TreeModelEvent e); |
|
59 |
||
60 |
/** |
|
61 |
* <p>Invoked after nodes have been inserted into the tree.</p> |
|
62 |
* |
|
63 |
* <p>Use <code>e.getPath()</code> |
|
64 |
* to get the parent of the new node(s). |
|
65 |
* <code>e.getChildIndices()</code> |
|
66 |
* returns the index(es) of the new node(s) |
|
67 |
* in ascending order.</p> |
|
68 |
*/ |
|
69 |
void treeNodesInserted(TreeModelEvent e); |
|
70 |
||
71 |
/** |
|
72 |
* <p>Invoked after nodes have been removed from the tree. Note that |
|
73 |
* if a subtree is removed from the tree, this method may only be |
|
74 |
* invoked once for the root of the removed subtree, not once for |
|
75 |
* each individual set of siblings removed.</p> |
|
76 |
* |
|
77 |
* <p>Use <code>e.getPath()</code> |
|
78 |
* to get the former parent of the deleted node(s). |
|
79 |
* <code>e.getChildIndices()</code> |
|
80 |
* returns, in ascending order, the index(es) |
|
81 |
* the node(s) had before being deleted.</p> |
|
82 |
*/ |
|
83 |
void treeNodesRemoved(TreeModelEvent e); |
|
84 |
||
85 |
/** |
|
86 |
* <p>Invoked after the tree has drastically changed structure from a |
|
87 |
* given node down. If the path returned by e.getPath() is of length |
|
88 |
* one and the first element does not identify the current root node |
|
21982 | 89 |
* the first element should become the new root of the tree. |
2 | 90 |
* |
91 |
* <p>Use <code>e.getPath()</code> |
|
92 |
* to get the path to the node. |
|
93 |
* <code>e.getChildIndices()</code> |
|
94 |
* returns null.</p> |
|
95 |
*/ |
|
96 |
void treeStructureChanged(TreeModelEvent e); |
|
97 |
||
98 |
} |