]> source.dussan.org Git - vaadin-framework.git/commitdiff
Add missing Tree#getContentMode (#9889)
authorAleksi Hietanen <aleksi@vaadin.com>
Tue, 29 Aug 2017 12:19:33 +0000 (15:19 +0300)
committerHenri Sara <henri.sara@gmail.com>
Tue, 29 Aug 2017 12:19:33 +0000 (15:19 +0300)
server/src/main/java/com/vaadin/ui/Tree.java

index bf8b3394b6d7be097eb7ac6294e8fb2e86dde26b..3981a0a9169ed95ad9b6e1e960ed46e7548e7c95 100644 (file)
@@ -840,9 +840,21 @@ public class Tree<T> extends Composite
         treeGrid.setRowHeight(rowHeight);
     }
 
+    /**
+     * Gets the currently set content mode of the item captions of this Tree.
+     *
+     * @since 8.1.3
+     * @see ContentMode
+     * @return the content mode of the item captions of this Tree
+     */
+    public ContentMode getContentMode() {
+        return renderer.getState(false).mode;
+    }
+
     /**
      * Sets the content mode of the item caption.
      *
+     * @see ContentMode
      * @param contentMode
      *            the content mode
      */
@@ -924,8 +936,8 @@ public class Tree<T> extends Composite
                     SelectionMode.SINGLE, SelectionMode.class, designContext);
         }
         DesignAttributeHandler.writeAttribute("content-mode", attrs,
-                renderer.getState(false).mode, ContentMode.TEXT,
-                ContentMode.class, designContext);
+                getContentMode(), ContentMode.TEXT, ContentMode.class,
+                designContext);
 
         if (designContext.shouldWriteData(this)) {
             writeItems(design, designContext);