diff options
author | Teemu Suo-Anttila <tsuoanttila@users.noreply.github.com> | 2018-05-15 15:57:21 +0300 |
---|---|---|
committer | Ilia Motornyi <elmot@vaadin.com> | 2018-05-15 15:57:21 +0300 |
commit | cebb74c38ba133453c8c97ce5b5fd0d15ab4ff21 (patch) | |
tree | fe4c31677429fa777657cedc4108df985125fc9d /server | |
parent | a4e2d461d5781b6b69ebda0757cc1c7e3d871f1d (diff) | |
download | vaadin-framework-cebb74c38ba133453c8c97ce5b5fd0d15ab4ff21.tar.gz vaadin-framework-cebb74c38ba133453c8c97ce5b5fd0d15ab4ff21.zip |
Add Focusable interface for Tree component (#10918)
Diffstat (limited to 'server')
-rw-r--r-- | server/src/main/java/com/vaadin/ui/Tree.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/server/src/main/java/com/vaadin/ui/Tree.java b/server/src/main/java/com/vaadin/ui/Tree.java index 2f5ca28ebd..cf8bb49f2b 100644 --- a/server/src/main/java/com/vaadin/ui/Tree.java +++ b/server/src/main/java/com/vaadin/ui/Tree.java @@ -58,6 +58,7 @@ import com.vaadin.shared.ui.grid.HeightMode; import com.vaadin.shared.ui.grid.ScrollDestination; import com.vaadin.shared.ui.tree.TreeMultiSelectionModelState; import com.vaadin.shared.ui.tree.TreeRendererState; +import com.vaadin.ui.Component.Focusable; import com.vaadin.ui.Grid.SelectionMode; import com.vaadin.ui.components.grid.MultiSelectionModelImpl; import com.vaadin.ui.components.grid.NoSelectionModel; @@ -80,7 +81,7 @@ import elemental.json.JsonObject; * the data type */ public class Tree<T> extends Composite - implements HasHierarchicalDataProvider<T> { + implements HasHierarchicalDataProvider<T>, Focusable { @Deprecated private static final Method ITEM_CLICK_METHOD = ReflectTools @@ -1263,4 +1264,18 @@ public class Tree<T> extends Composite treeGrid.scrollToEnd(); } + @Override + public int getTabIndex() { + return treeGrid.getTabIndex(); + } + + @Override + public void setTabIndex(int tabIndex) { + treeGrid.setTabIndex(tabIndex); + } + + @Override + public void focus() { + treeGrid.focus(); + } } |