From 0fcade9ddfe7b624faa2e80e6138b5ac5c5ce950 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 25 Jun 2012 12:04:22 +0300 Subject: Fixed tab index for Button and NativeButton (#9022) --- src/com/vaadin/ui/Button.java | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'src/com/vaadin/ui') diff --git a/src/com/vaadin/ui/Button.java b/src/com/vaadin/ui/Button.java index 8e504d828b..0abc50f26f 100644 --- a/src/com/vaadin/ui/Button.java +++ b/src/com/vaadin/ui/Button.java @@ -357,8 +357,6 @@ public class Button extends AbstractComponent implements protected ClickShortcut clickShortcut; - private int tabIndex = 0; - /** * Makes it possible to invoke a click on this button by pressing the given * {@link KeyCode} and (optional) {@link ModifierKey}s.
@@ -471,13 +469,23 @@ public class Button extends AbstractComponent implements requestRepaint(); } + /* + * (non-Javadoc) + * + * @see com.vaadin.ui.Component.Focusable#getTabIndex() + */ public int getTabIndex() { - return tabIndex; + return getState().getTabIndex(); } + /* + * (non-Javadoc) + * + * @see com.vaadin.ui.Component.Focusable#setTabIndex(int) + */ public void setTabIndex(int tabIndex) { - this.tabIndex = tabIndex; - + getState().setTabIndex(tabIndex); + requestRepaint(); } @Override -- cgit v1.2.3