changeset 816:dc7b1ba05cd4

Removed superfluous imports. flys-client/trunk@2472 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 08 Aug 2011 17:00:32 +0000
parents 112f95d7b286
children 8f39ffee068a
files flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWindow.java
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWindow.java	Mon Aug 08 16:24:07 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWindow.java	Mon Aug 08 17:00:32 2011 +0000
@@ -16,6 +16,9 @@
 import com.smartgwt.client.widgets.layout.Layout;
 import com.smartgwt.client.widgets.layout.VLayout;
 
+import com.smartgwt.client.widgets.tree.events.LeafClickEvent;
+import com.smartgwt.client.widgets.tree.events.LeafClickHandler;
+
 import de.intevation.flys.client.shared.model.Artifact;
 import de.intevation.flys.client.shared.model.ArtifactDescription;
 import de.intevation.flys.client.shared.model.Data;
@@ -31,6 +34,7 @@
 
 import de.intevation.flys.client.shared.model.DataCageTree;
 import de.intevation.flys.client.shared.model.DataCageNode;
+import de.intevation.flys.client.shared.model.AttrList;
 
 import de.intevation.flys.client.client.widgets.tree.AttributedTreeNode;
 
@@ -69,6 +73,20 @@
         treeGrid.setWidth100();
         treeGrid.setHeight100();
 
+        treeGrid.addLeafClickHandler(new LeafClickHandler() {
+            @Override
+            public void onLeafClicked(LeafClickEvent lce) {
+                AttributedTreeNode atn = (AttributedTreeNode)lce.getLeaf();
+                AttrList attrList = atn.getSpecialAttributes();
+                if (attrList != null) {
+                    for (int i = 0, N = attrList.size(); i < N; ++i) {
+                        GWT.log("'" + attrList.getKey(i) + 
+                            "' -> '" + attrList.getValue(i) + "'");
+                    }
+                }
+            }
+        });
+
         layout.addMember(treeGrid);
 
         String river =  findRiver();

http://dive4elements.wald.intevation.org