From 6387223f4e98f3fafc2ddd9b5eea8b6daccb550d Mon Sep 17 00:00:00 2001 From: Matti Tahvonen Date: Fri, 15 Aug 2008 14:05:35 +0000 Subject: [PATCH] Minor changes for tabIndex definition. svn changeset:5197/svn branch:trunk --- src/com/itmill/toolkit/ui/AbstractField.java | 18 +++++++----------- src/com/itmill/toolkit/ui/Component.java | 11 ++++++----- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/src/com/itmill/toolkit/ui/AbstractField.java b/src/com/itmill/toolkit/ui/AbstractField.java index af0108a1d7..71b1c4c140 100644 --- a/src/com/itmill/toolkit/ui/AbstractField.java +++ b/src/com/itmill/toolkit/ui/AbstractField.java @@ -130,7 +130,7 @@ public abstract class AbstractField extends AbstractComponent implements Field, public void paintContent(PaintTarget target) throws PaintException { // The tab ordering number - if (tabIndex > 0) { + if (tabIndex != 0) { target.addAttribute("tabindex", tabIndex); } @@ -941,23 +941,19 @@ public abstract class AbstractField extends AbstractComponent implements Field, return new TextField(); } - /** - * Gets the tab index of this field. The tab index property is used to - * specify the natural tab ordering of fields. + /* + * (non-Javadoc) * - * @return the Tab index of this field. Negative value means unspecified. + * @see com.itmill.toolkit.ui.Component.Focusable#getTabIndex() */ public int getTabIndex() { return tabIndex; } - /** - * Gets the tab index of this field. The tab index property is used to - * specify the natural tab ordering of fields. + /* + * (non-Javadoc) * - * @param tabIndex - * the tab order of this component. Negative value means - * unspecified. + * @see com.itmill.toolkit.ui.Component.Focusable#setTabIndex(int) */ public void setTabIndex(int tabIndex) { this.tabIndex = tabIndex; diff --git a/src/com/itmill/toolkit/ui/Component.java b/src/com/itmill/toolkit/ui/Component.java index 08628ddf5b..3f7d1ed764 100644 --- a/src/com/itmill/toolkit/ui/Component.java +++ b/src/com/itmill/toolkit/ui/Component.java @@ -390,17 +390,18 @@ public interface Component extends Paintable, VariableOwner, Sizeable { /** * Gets the Tabulator index of this Focusable component. * - * @return the Positive tab order of this focusable. Negative of zero - * means unspecified tab order. + * @return tab index set for this Focusable component */ public int getTabIndex(); /** - * Sets the Tabulator index of this Focusable component. + * Sets the tab index of this field. The tab index property is used to + * specify the natural tab order of fields. * * @param tabIndex - * the Positive tab order of this focusable. Negative of - * zero means unspecified tab order. + * the tab order of this component. Indexes usually start + * from 1. Negative value means that field is not wanted + * to tabbing sequence. */ public void setTabIndex(int tabIndex); -- 2.39.5