Example usage for com.google.gwt.user.client.ui RadioButton setAccessKey

List of usage examples for com.google.gwt.user.client.ui RadioButton setAccessKey

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui RadioButton setAccessKey.

Prototype

@Override
    public void setAccessKey(char key) 

Source Link

Usage

From source file:net.sf.mmm.client.ui.impl.gwt.widget.field.adapter.UiWidgetAdapterGwtRadioButtons.java

License:Apache License

/**
 * {@inheritDoc}/*from w  w w .j av  a  2  s.c om*/
 */
@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);
}