aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorAleksi Hietanen <aleksi@vaadin.com>2017-08-29 15:19:33 +0300
committerHenri Sara <henri.sara@gmail.com>2017-08-29 15:19:33 +0300
commit07b1ffa3bf158fdd74b0945500e56a25e63f8293 (patch)
treeff8c6f198df331d41f921bf620a2719fd16ad0b7 /server
parent5830337e38d5f262742e8b8a9b03125278a63c94 (diff)
downloadvaadin-framework-07b1ffa3bf158fdd74b0945500e56a25e63f8293.tar.gz
vaadin-framework-07b1ffa3bf158fdd74b0945500e56a25e63f8293.zip
Add missing Tree#getContentMode (#9889)
Diffstat (limited to 'server')
-rw-r--r--server/src/main/java/com/vaadin/ui/Tree.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/server/src/main/java/com/vaadin/ui/Tree.java b/server/src/main/java/com/vaadin/ui/Tree.java
index bf8b3394b6..3981a0a916 100644
--- a/server/src/main/java/com/vaadin/ui/Tree.java
+++ b/server/src/main/java/com/vaadin/ui/Tree.java
@@ -841,8 +841,20 @@ public class Tree<T> extends Composite
}
/**
+ * 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);