diff options
Diffstat (limited to 'src/com/vaadin/ui')
-rw-r--r-- | src/com/vaadin/ui/TabSheet.java | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/src/com/vaadin/ui/TabSheet.java b/src/com/vaadin/ui/TabSheet.java index a13c336943..1275eda69f 100644 --- a/src/com/vaadin/ui/TabSheet.java +++ b/src/com/vaadin/ui/TabSheet.java @@ -14,6 +14,10 @@ import java.util.HashSet; import java.util.Iterator; import java.util.Map; +import com.vaadin.event.FieldEvents.BlurEvent; +import com.vaadin.event.FieldEvents.BlurListener; +import com.vaadin.event.FieldEvents.FocusEvent; +import com.vaadin.event.FieldEvents.FocusListener; import com.vaadin.terminal.ErrorMessage; import com.vaadin.terminal.KeyMapper; import com.vaadin.terminal.PaintException; @@ -21,6 +25,7 @@ import com.vaadin.terminal.PaintTarget; import com.vaadin.terminal.Resource; import com.vaadin.terminal.gwt.client.ui.VTabsheet; import com.vaadin.terminal.gwt.server.CommunicationManager; +import com.vaadin.ui.Component.Focusable; import com.vaadin.ui.themes.Reindeer; import com.vaadin.ui.themes.Runo; @@ -55,7 +60,8 @@ import com.vaadin.ui.themes.Runo; */ @SuppressWarnings("serial") @ClientWidget(VTabsheet.class) -public class TabSheet extends AbstractComponentContainer { +public class TabSheet extends AbstractComponentContainer implements Focusable, + FocusListener, BlurListener { /** * List of component tabs (tab contents). In addition to being on this list, @@ -95,6 +101,8 @@ public class TabSheet extends AbstractComponentContainer { */ private CloseHandler closeHandler; + private int tabIndex; + /** * Constructs a new Tabsheet. Tabsheet is immediate by default, and the * default close handler removes the tab being closed. @@ -363,6 +371,10 @@ public class TabSheet extends AbstractComponentContainer { target.addAttribute("hidetabs", true); } + if (tabIndex != 0) { + target.addAttribute("tabindex", tabIndex); + } + target.startTag("tabs"); Collection<Component> orphaned = new HashSet<Component>(paintedTabs); @@ -1226,4 +1238,27 @@ public class TabSheet extends AbstractComponentContainer { return components.indexOf(tab.getComponent()); } + public void blur(BlurEvent event) { + // TODO Auto-generated method stub + + } + + public void focus(FocusEvent event) { + // TODO Auto-generated method stub + } + + @Override + public void focus() { + super.focus(); + } + + public int getTabIndex() { + return tabIndex; + } + + public void setTabIndex(int tabIndex) { + this.tabIndex = tabIndex; + requestRepaint(); + } + } |