summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--WebContent/VAADIN/themes/reindeer/tree/tree.css9
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VTree.java7
2 files changed, 10 insertions, 6 deletions
diff --git a/WebContent/VAADIN/themes/reindeer/tree/tree.css b/WebContent/VAADIN/themes/reindeer/tree/tree.css
index d33985f713..0274d8b18e 100644
--- a/WebContent/VAADIN/themes/reindeer/tree/tree.css
+++ b/WebContent/VAADIN/themes/reindeer/tree/tree.css
@@ -11,13 +11,16 @@
.v-tree-node-expanded {
background-position: -7px 5px;
}
-.v-tree-connectors .v-tree-node-leaf {
+.v-tree-connectors .v-tree-node-leaf,
+.v-tree-connectors .v-tree-node-leaf:hover {
background-position: 8px -1px;
}
-.v-ie6 .v-tree-connectors div.v-tree-node-leaf {
+.v-ie6 .v-tree-connectors div.v-tree-node-leaf,
+.v-ie6 .v-tree-connectors div.v-tree-node-leaf:hover {
background: transparent url(../../base/tree/img/connector-item.png) no-repeat 8px -1px;
}
-.v-ie6 .v-tree-connectors div.v-tree-node-leaf-last {
+.v-ie6 .v-tree-connectors div.v-tree-node-leaf-last,
+.v-ie6 .v-tree-connectors div.v-tree-node-leaf-last:hover {
background: transparent url(../../base/tree/img/connector-item-last.png) no-repeat 8px -1px;
}
.v-tree-node-caption {
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTree.java b/src/com/vaadin/terminal/gwt/client/ui/VTree.java
index d7f575d675..d63ddc5e02 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VTree.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VTree.java
@@ -266,8 +266,9 @@ public class VTree extends FocusElementPanel implements Paintable,
body.clear();
TreeNode childTree = null;
+ UIDL childUidl = null;
for (final Iterator<?> i = uidl.getChildIterator(); i.hasNext();) {
- final UIDL childUidl = (UIDL) i.next();
+ childUidl = (UIDL) i.next();
if ("actions".equals(childUidl.getTag())) {
updateActionMap(childUidl);
continue;
@@ -286,8 +287,8 @@ public class VTree extends FocusElementPanel implements Paintable,
childTree.addStyleDependentName("root");
childTree.childNodeContainer.addStyleDependentName("root");
}
- if (childTree != null) {
- boolean leaf = !uidl.getTag().equals("node");
+ if (childTree != null && childUidl != null) {
+ boolean leaf = !childUidl.getTag().equals("node");
childTree.addStyleDependentName(leaf ? "leaf-last" : "last");
childTree.childNodeContainer.addStyleDependentName("last");
}