From 64c1a2371c23cd038e604da72387c1b6cc538b4a Mon Sep 17 00:00:00 2001 From: Aleksi Hietanen Date: Tue, 29 Aug 2017 15:19:33 +0300 Subject: [PATCH] Add missing Tree#getContentMode (#9889) --- server/src/main/java/com/vaadin/ui/Tree.java | 16 ++++++++++++++-- 1 file 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 5b95156870..1253d88210 100644 --- a/server/src/main/java/com/vaadin/ui/Tree.java +++ b/server/src/main/java/com/vaadin/ui/Tree.java @@ -815,9 +815,21 @@ public class Tree 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 */ @@ -899,8 +911,8 @@ public class Tree 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); -- 2.39.5