diff options
author | Teemu Suo-Anttila <tsuoanttila@users.noreply.github.com> | 2017-11-24 12:51:22 +0200 |
---|---|---|
committer | Aleksi Hietanen <aleksi@vaadin.com> | 2017-11-24 12:51:22 +0200 |
commit | 780cab157d03a8ca81dec3667fe235ec10207efe (patch) | |
tree | 3a81ffd6b25212f21efe7535080e009a6a2d80ac | |
parent | 7db9fd366636d3172092c32515e0c3534b455493 (diff) | |
download | vaadin-framework-780cab157d03a8ca81dec3667fe235ec10207efe.tar.gz vaadin-framework-780cab157d03a8ca81dec3667fe235ec10207efe.zip |
Add missing JavaDocs and since tags (#10372)
3 files changed, 24 insertions, 0 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/FocusUtil.java b/client/src/main/java/com/vaadin/client/ui/FocusUtil.java index 6fbbc5d9df..0f517d89ed 100644 --- a/client/src/main/java/com/vaadin/client/ui/FocusUtil.java +++ b/client/src/main/java/com/vaadin/client/ui/FocusUtil.java @@ -96,12 +96,27 @@ public class FocusUtil { return focusable.getElement().getTabIndex(); } + /** + * Finds all the focusable children of given parent element. + * + * @param parent + * the parent element + * @return array of focusable children + * @since 8.1.7 + */ public static native Element[] getFocusableChildren(Element parent) /*-{ var focusableChildren = parent.querySelectorAll('[type][tabindex]:not([tabindex="-1"]), [role=button][tabindex]:not([tabindex="-1"])'); return focusableChildren; }-*/; + /** + * Moves the focus to the first focusable child of given parent element. + * + * @param parent + * the parent element + * @since 8.1.7 + */ public static void focusOnFirstFocusableElement(Element parent) { Element[] focusableChildren = getFocusableChildren(parent); if (focusableChildren.length > 0) { @@ -109,6 +124,13 @@ public class FocusUtil { } } + /** + * Moves the focus to the last focusable child of given parent element. + * + * @param parent + * the parent element + * @since 8.1.7 + */ public static void focusOnLastFocusableElement(Element parent) { Element[] focusableChildren = getFocusableChildren(parent); if (focusableChildren.length > 0) { diff --git a/client/src/main/java/com/vaadin/client/ui/VAccordion.java b/client/src/main/java/com/vaadin/client/ui/VAccordion.java index c103f9e726..f004b6d5d5 100644 --- a/client/src/main/java/com/vaadin/client/ui/VAccordion.java +++ b/client/src/main/java/com/vaadin/client/ui/VAccordion.java @@ -117,6 +117,7 @@ public class VAccordion extends VTabsheetBase { * * @param tabIndex * tabulator index for the open stack item + * @since 8.1.7 */ public void setTabIndex(int tabIndex) { tabulatorIndex = tabIndex; diff --git a/client/src/main/java/com/vaadin/client/ui/VTabsheet.java b/client/src/main/java/com/vaadin/client/ui/VTabsheet.java index c9c721bbe9..75ea3a4ce1 100644 --- a/client/src/main/java/com/vaadin/client/ui/VTabsheet.java +++ b/client/src/main/java/com/vaadin/client/ui/VTabsheet.java @@ -791,6 +791,7 @@ public class VTabsheet extends VTabsheetBase * * @param tabIndex * tabulator index for the active tab of the tab sheet + * @since 8.1.7 */ public void setTabIndex(int tabIndex) { tabulatorIndex = tabIndex; |