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

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

Introduction

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

Prototype

@Override
public void setName(String name) 

Source Link

Document

Change the group name of this radio button.

Usage

From source file:com.gwtm.ui.client.widgets.RadioButtonGroup.java

License:Apache License

@Override
public void add(Widget w) {
    // no assertions for gwtdesigner reasons
    //       assert w instanceof RadioButton 
    //          : "Can only contain RadioButton widgets in RadioButtonGroup";
    if (Beans.isDesignTime() && !(w instanceof RadioButton))
        return;/*from   w  w w. ja  va  2 s .  c o  m*/

    RadioButton radio = (RadioButton) w;
    if (name != null) {
        radio.setName(name);
    }
    super.addWidgetToPanel(radio);
    radio.addValueChangeHandler(this);
}

From source file:com.gwtm.ui.client.widgets.RadioButtonGroup.java

License:Apache License

public void setName(String name) {
    this.name = name;
    for (int i = 0; i < getWidgetCount(); i++) {
        RadioButton radio = (RadioButton) getWidget(i);
        radio.setName(name);
    }//from   www  .j a v a  2s  .c o m
}

From source file:com.gwtmobile.ui.client.widgets.RadioButtonGroup.java

License:Apache License

@Override
public void add(Widget w) {
    // no assertions for gwtdesigner reasons
    //       assert w instanceof RadioButton 
    //          : "Can only contain RadioButton widgets in RadioButtonGroup";
    if (Beans.isDesignTime() && !(w instanceof RadioButton))
        return;/*from   www.j av  a2s  .  co  m*/

    RadioButton radio = (RadioButton) w;
    if (_name != null) {
        radio.setName(_name);
    }
    super.addWidgetToPanel(radio);
    radio.addValueChangeHandler(this);
}

From source file:com.gwtmobile.ui.client.widgets.RadioButtonGroup.java

License:Apache License

public void setName(String name) {
    this._name = name;
    for (int i = 0; i < getWidgetCount(); i++) {
        RadioButton radio = (RadioButton) getWidget(i);
        radio.setName(name);
    }//  w w  w .ja va  2 s  .c  o  m
}

From source file:com.gwtmodel.table.view.ewidget.gwt.RadioBoxField.java

License:Apache License

RadioBoxField(IVField v, IFormFieldProperties pr) {
    super(v, pr);
    vP = new VerticalPanel();
    ra = new ArrayList<RadioButton>();
    for (String s : listT.getListVal()) {
        RadioButton r = new RadioButton(getHtmlName(), s);
        r.setName(s);
        vP.add(r);/*from   w  w w  . ja va2  s.  co  m*/
        ra.add(r);
    }
    initWidget(vP);
}

From source file:com.wfairclough.foundation4gwt.client.ui.widget.RadioButtonGroup.java

License:Apache License

/**
 * {@inheritDoc}//from www  . j  a  v a2 s . co  m
 */
@Override
public void add(IsWidget child) {
    Widget widget = asWidgetOrNull(child);

    if (widget != null && (child instanceof RadioButton)) {
        RadioButton btn = (RadioButton) widget;
        btn.setName(RADIO_BTN_GROUP_CLASS + RADIO_BTN_COUNT);
        radioButtonList.add(btn);
        super.add(btn, getElement());
    } else {
        throw new IllegalArgumentException(ADD_WIDGET_RADIO_BTN_GROUP);
    }
}

From source file:com.wfairclough.foundation4gwt.client.ui.widget.RadioButtonGroup.java

License:Apache License

/**
 * {@inheritDoc}// ww w  .  ja  va  2 s .  c om
 */
@Override
public void add(Widget child) {
    if (child instanceof RadioButton) {
        RadioButton btn = (RadioButton) child;
        btn.setName(RADIO_BTN_GROUP_CLASS + RADIO_BTN_COUNT);
        radioButtonList.add(btn);
        super.add(btn, getElement());
    } else {
        throw new IllegalArgumentException(ADD_WIDGET_RADIO_BTN_GROUP);
    }
}

From source file:com.wfairclough.foundation4gwt.client.ui.widget.RadioButtonGroup.java

License:Apache License

/**
 * Set the name of all the RadioButtons in the group.
 * /* w  ww.j a va 2s .  c  o  m*/
 * @param name
 */
public void setName(String name) {
    for (Widget w : getChildren()) {
        if (w instanceof RadioButton) {
            RadioButton btn = (RadioButton) w;
            btn.setName(name);
        }
    }
}

From source file:de.swm.commons.mobile.client.widgets.GenericRadioButtonGroup.java

License:Apache License

@Override
public void add(Widget w) {
    assert w instanceof RadioButton : "Can only contain RadioButton widgets in RadioButtonGroup";
    RadioButton radio = (RadioButton) w;

    if (keyValueProvider != null) {
        if (this.keyValueProvider.getValue(radio.getFormValue()) != null) {
            T enumValue = this.keyValueProvider.getValue(radio.getFormValue());
            this.keyIndexMap.put(radio.getFormValue(), lastIndex);
            this.indexKeyMap.put(lastIndex, radio.getFormValue());
            radio.setText(renderer.render(enumValue));
            myFlowPanel.add(radio);/*from  w  ww.ja  v a2 s . co  m*/
            lastIndex++;
        }
    } else {
        myFlowPanel.add(radio);
    }
    if (myName != null) {
        radio.setName(myName);
    }
    radio.addValueChangeHandler(this);
}

From source file:de.swm.commons.mobile.client.widgets.GenericRadioButtonGroup.java

License:Apache License

/**
 * Sets the name of the slideUpPanel./*from  w  w w .  j a v a  2 s .c o m*/
 *
 * @param name the name
 */
public void setName(String name) {
    myName = name;
    for (int i = 0; i < myFlowPanel.getWidgetCount(); i++) {
        RadioButton radio = (RadioButton) myFlowPanel.getWidget(i);
        radio.setName(myName);
    }
}