changeset 2478:6462a02022ab

Issue 424. Show folder icon for folder nodes with no children in datacage. flys-client/trunk@4229 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 13 Apr 2012 08:21:20 +0000
parents 936e3e6cd9b9
children 057021593625
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWidget.java
diffstat 2 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Thu Apr 12 09:49:41 2012 +0000
+++ b/flys-client/ChangeLog	Fri Apr 13 08:21:20 2012 +0000
@@ -1,3 +1,10 @@
+2012-04-13  Raimund Renkert <raimund.renkert@intevation.de>
+
+	Issue 424.
+
+	* src/main/java/de/intevation/flys/client/client/ui/DatacageWidget.java:
+	  Show folder icon for folder nodes with no children.
+
 2012-04-12  Raimund Renkert <raimund.renkert@intevation.de>
 
 	Issue 502.
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWidget.java	Thu Apr 12 09:49:41 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWidget.java	Fri Apr 13 08:21:20 2012 +0000
@@ -384,6 +384,14 @@
                     TreeNode root = buildRecursiveChildren(
                         dcRoot, idGenerator);
                     tree.setRoot(root);
+
+                    TreeNode[] nodes = tree.getChildren(root);
+                    for (int i = 0; i < nodes.length; i++) {
+                        if(!tree.hasChildren(nodes[i])) {
+                            nodes[i].setIsFolder(true);
+                        }
+                    }
+
                     if (idGenerator.current() < MAX_OPEN) {
                         tree.openAll();
                     }

http://dive4elements.wald.intevation.org