Documenting different behaviour of createNodes in the new Children.Keys constructor
authorTomas Holy <t_h@netbeans.org>
Fri Jul 11 10:45:38 2008 +0200 (6 weeks ago)
changeset 88481a13cf1a44f0a
parent 88480e9dcabf0ce25
child 88482aace0eb6eec2
Documenting different behaviour of createNodes in the new Children.Keys constructor
openide.nodes/src/org/openide/nodes/Children.java
diff -r o -r p -r e -r n -r i -r d -r e -r . -r n -r o -r d -r e -r s -r / -r s -r r -r c -r / -r o -r r -r g -r / -r o -r p -r e -r n -r i -r d -r e -r / -r n -r o -r d -r e -r s -r / -r C -r h -r i -r l -r d -r r -r e -r n -r . -r j -r a -r v -r a openide.nodes/src/org/openide/nodes/Children.java
--- a/openide.nodes/src/org/openide/nodes/Children.java
+++ b/openide.nodes/src/org/openide/nodes/Children.java
@@ -1221,9 +1221,16 @@ public abstract class Children extends O
this(false);
}
- /** Constructor
- * @param lazy whether to introduce lazy behavior (tries to avoid
- * computation of nodes if possible)
+ /** Constructor for optional "lazy behavoir" (tries to avoid
+ * computation of nodes if possible).
+ * <p> There are certain requirements for usage of lazy mode:
+ * It is forbidden to create more than 1 node in {@link #createNodes}
+ * for key. In optimal case there should be 1:1 pairing between key and Node,
+ * but it is also possible to have 1:0 pairing - create no node (return null).
+ * In such case after detection that there is no Node for key,
+ * the key is automatically removed and change (removal of
+ * "dummy" Node) is fired.
+ * @param lazy whether to introduce lazy behavior
* @since org.openide.nodes 7.6
*/
protected Keys(boolean lazy) {