use of com.google.gwt.user.client.ui.RadioButton in project cuba by cuba-platform.
the class CubaRadioButtonGroupWidget method buildOptions.
@Override
public void buildOptions(List<JsonObject> items) {
super.buildOptions(items);
for (Widget widget : getWidget()) {
if (widget instanceof RadioButton) {
((RadioButton) widget).addKeyDownHandler(this);
((RadioButton) widget).addValueChangeHandler(this);
}
}
}
use of com.google.gwt.user.client.ui.RadioButton in project cuba by cuba-platform.
the class CubaRadioButtonGroupWidget method updateItemsSelection.
protected void updateItemsSelection() {
for (Widget widget : getWidget()) {
if (widget instanceof RadioButton) {
boolean checked = widget.getElement().hasClassName(CLASSNAME_OPTION_SELECTED);
updateItemSelection((RadioButton) widget, checked);
}
}
}
use of com.google.gwt.user.client.ui.RadioButton in project ovirt-engine by oVirt.
the class VmRunOncePopupWidget method initRadioButtonEditors.
void initRadioButtonEditors() {
// $NON-NLS-1$
runOnceHeadlessModeEditor = new EntityModelRadioButtonEditor("1");
// $NON-NLS-1$
displayConsoleVncEditor = new EntityModelRadioButtonEditor("1");
// $NON-NLS-1$
displayConsoleSpiceEditor = new EntityModelRadioButtonEditor("1");
runOnceHeadlessModeEnabledInfoIcon = new InfoIcon(SafeHtmlUtils.fromTrustedString(constants.runOnceHeadlessModeExplanation()));
// host tab
// $NON-NLS-1$
specificHost = new RadioButton("runVmOnHostGroup");
// $NON-NLS-1$
isAutoAssignEditor = new EntityModelRadioButtonEditor("runVmOnHostGroup");
}
use of com.google.gwt.user.client.ui.RadioButton in project gwt-test-utils by gwt-test-utils.
the class RadioButtonTest method click_Twice_ClickHandler.
@Test
public void click_Twice_ClickHandler() {
// Given
tested = false;
RadioButton r1 = new RadioButton("myRadioGroup", "r1");
RadioButton r2 = new RadioButton("myRadioGroup", "r2");
r1.addClickHandler(event -> tested = !tested);
r2.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
tested = !tested;
}
});
// Preconditions
assertThat(tested).isEqualTo(false);
// When
Browser.click(r1);
Browser.click(r1);
// Then
assertThat(tested).isEqualTo(false);
assertThat(r1.getValue()).isEqualTo(true);
}
use of com.google.gwt.user.client.ui.RadioButton in project gwt-test-utils by gwt-test-utils.
the class RadioButtonTest method title.
@Test
public void title() {
// Given
RadioButton rb = new RadioButton("myRadioGroup", "foo");
// Preconditions
assertThat(rb.getTitle()).isEqualTo("");
// When
rb.setTitle("title");
// Then
assertThat(rb.getTitle()).isEqualTo("title");
}
Aggregations