List of usage examples for com.google.gwt.user.client.ui RadioButton setTabIndex
@Override
public void setTabIndex(int index)
From source file:net.sf.mmm.client.ui.impl.gwt.widget.field.adapter.UiWidgetAdapterGwtRadioButtons.java
License:Apache License
/** * {@inheritDoc}//from w ww. j a va 2 s .co m */ @Override public void setOptions(List<String> options) { for (RadioButton rb : this.radioButtons) { rb.removeFromParent(); } this.radioButtons.clear(); this.options = options; boolean first = true; for (String title : options) { RadioButton rb = new RadioButton(this.groupId, title); if (first) { rb.setTabIndex(0); if (this.accessKey != ACCESS_KEY_NONE) { rb.setAccessKey(this.accessKey); } first = false; } else { rb.setTabIndex(-2); } getActiveWidget().add(rb); this.radioButtons.add(rb); rb.addClickHandler(this); } EventAdapterGwt eventAdapter = getEventAdapter(); // applyEventAdapter(eventAdapter); applyEventAdapterForChange(eventAdapter); applyEventAdapterForFocus(eventAdapter); }
From source file:net.sf.mmm.client.ui.impl.gwt.widget.field.adapter.UiWidgetAdapterGwtRadioButtons.java
License:Apache License
/** * {@inheritDoc}//from w ww . j ava 2 s. c o m */ @Override public void onClick(ClickEvent event) { for (RadioButton rb : this.radioButtons) { int tabIndex = -1; if (rb.getValue().booleanValue()) { tabIndex = 0; } rb.setTabIndex(tabIndex); } }