From b153ba2f8b8539df45ace39864fd0db4a4c26e4d Mon Sep 17 00:00:00 2001 From: Aleksi Hietanen Date: Mon, 15 May 2017 12:46:45 +0300 Subject: [PATCH] Add TreeGrid#getHierarchyColumn --- server/src/main/java/com/vaadin/ui/TreeGrid.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/server/src/main/java/com/vaadin/ui/TreeGrid.java b/server/src/main/java/com/vaadin/ui/TreeGrid.java index a55cd6aef3..f24e5ca9ec 100644 --- a/server/src/main/java/com/vaadin/ui/TreeGrid.java +++ b/server/src/main/java/com/vaadin/ui/TreeGrid.java @@ -252,6 +252,16 @@ public class TreeGrid extends Grid super.setDataProvider(dataProvider); } + /** + * Get the currently set hierarchy column. + * + * @return the currently set hierarchy column, or {@code null} if no column + * has been explicitly set + */ + public Column getHierarchyColumn() { + return getColumn(getState(false).hierarchyColumnId); + } + /** * Set the column that displays the hierarchy of this grid's data. By * default the hierarchy will be displayed in the first column. -- 2.39.5