diff options
author | Artur Signell <artur@vaadin.com> | 2012-09-04 09:38:38 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-09-04 09:39:00 +0300 |
commit | 52c4b1905e311f72fdf8080a1917e87c30355a61 (patch) | |
tree | ea6550035a87b957f2ede7e37ca0881b2237ce74 /server/src/com/vaadin/ui/Tree.java | |
parent | 112572a700c288fc49df60ea23a2ade7c51c5165 (diff) | |
download | vaadin-framework-52c4b1905e311f72fdf8080a1917e87c30355a61.tar.gz vaadin-framework-52c4b1905e311f72fdf8080a1917e87c30355a61.zip |
ItemStyleGenerator.getStyle now includes source component (#5822)
Diffstat (limited to 'server/src/com/vaadin/ui/Tree.java')
-rw-r--r-- | server/src/com/vaadin/ui/Tree.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/server/src/com/vaadin/ui/Tree.java b/server/src/com/vaadin/ui/Tree.java index ad3674fe1e..306d1f18ba 100644 --- a/server/src/com/vaadin/ui/Tree.java +++ b/server/src/com/vaadin/ui/Tree.java @@ -611,7 +611,8 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, } if (itemStyleGenerator != null) { - String stylename = itemStyleGenerator.getStyle(itemId); + String stylename = itemStyleGenerator + .getStyle(this, itemId); if (stylename != null) { target.addAttribute(TreeConstants.ATTRIBUTE_NODE_STYLE, stylename); @@ -1255,12 +1256,14 @@ public class Tree extends AbstractSelect implements Container.Hierarchical, /** * Called by Tree when an item is painted. * + * @param source + * the source Tree * @param itemId * The itemId of the item to be painted * @return The style name to add to this item. (the CSS class name will * be v-tree-node-[style name] */ - public abstract String getStyle(Object itemId); + public abstract String getStyle(Tree source, Object itemId); } // Overriden so javadoc comes from Container.Hierarchical |