Revisions:
20 decembre 2002 Sacha Labourey:
// Static -------------------------------------------------------- // Constructors -------------------------------------------------- this.node = node; this.master = master; this.path = parentPath + "/" + this.node.getName (); TreeNode[] plugged = null; if (node instanceof ResourceTreeNode) { plugged = master.getTreesForResource( ((ResourceTreeNode)node).getResource() ); // Now we check which kind of visibility we want to give // int visibility = ((ResourceTreeNode)node).getVisibility(); if (visibility == ResourceTreeNode.INVISIBLE_IF_SUBNODE_EXISTS && plugged != null && plugged.length > 0) { this.node = getMasterFromPluggins (plugged); plugged = removeMasterFromList (plugged, this.node); } } TreeNode[] res = this.node.getNodeManagableResources (); TreeNode[] sub = this.node.getSubNodes (); if (res == null) res = new TreeNode[0]; if (sub == null) sub = new TreeNode[0]; if (plugged == null) plugged = new TreeNode[0]; realSons = new TreeNode[res.length + sub.length + plugged.length]; sons = new NodeWrapper[res.length + sub.length + plugged.length]; for (int i=0; i<res.length; i++) realSons[i] = res[i]; for (int i=0; i<sub.length; i++) realSons[res.length+i] = sub[i]; for (int i=0; i<plugged.length; i++) realSons[res.length+sub.length+i] = plugged[i];
return this.node.getAction ();
if (index >= sons.length) return null; if (sons[index] == null) sons[index] = new StdNodeWrapper(realSons[index], this.master, this.path); return sons[index];
return this.realSons.length;
return this.node.getDescription ();
return this.node.getIcon ();
for (int i=0; i<this.sons.length; i++) { if (this.sons[i] == child) return i; } return -1;
for (int i=0; i<plugged.length; i++) { if (plugged[i].isMasterNode()) return plugged[i]; } return plugged[0];
return this.node.getMenuEntries ();
return this.path;
return this.sons.length == 0;
TreeNode[] result = new TreeNode[all.length-1]; int cursor = 0; for (int i=0; i<all.length; i++) { if (all[i] != main) { result[cursor] = all[i]; cursor++; } } return result;
return this.node.getName ();