diff options
author | Jouni Koivuviita <jouni.koivuviita@itmill.com> | 2011-08-24 09:45:31 +0000 |
---|---|---|
committer | Jouni Koivuviita <jouni.koivuviita@itmill.com> | 2011-08-24 09:45:31 +0000 |
commit | f10053dab3a47729491d70609e8f89592da9df7f (patch) | |
tree | 2d9ee8eb304286066cf2b71686cf1ec711a63043 | |
parent | de0c9fcd2619ca9ade985f4b2642f49c537584ae (diff) | |
download | vaadin-framework-f10053dab3a47729491d70609e8f89592da9df7f.tar.gz vaadin-framework-f10053dab3a47729491d70609e8f89592da9df7f.zip |
Small bugfix related to #6745: Connectors for Tree
-Tree root nodes received a wrong classname if they had childnodes (the last root node was always treated as a leaf)
-Fixed hover styles in Reindeer
svn changeset:20605/svn branch:6.7
-rw-r--r-- | WebContent/VAADIN/themes/reindeer/tree/tree.css | 9 | ||||
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/VTree.java | 7 |
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"); } |