use of org.gwtbootstrap3.client.ui.RadioButton in project drools-wb by kiegroup.
the class FileExtensionSelector method addRadioButtons.
private void addRadioButtons() {
boolean first = true;
for (String resourceSuffix : this.resourceTypes.keySet()) {
Radio radioButton = new Radio(FILE_TYPE);
radioButton.setText(resourceSuffix);
radioButton.setValue(first);
first = false;
radioButtonList.add(radioButton);
add(radioButton);
}
}
use of org.gwtbootstrap3.client.ui.RadioButton in project ovirt-engine by oVirt.
the class RadioButtonPanel method createRadioButton.
private RadioButton createRadioButton(String title, boolean active, boolean enabled, ValueChangeHandler<Boolean> handler) {
RadioButton button = new RadioButton(title);
button.setHTML(title);
button.setName(name);
button.setEnabled(enabled);
button.setActive(active);
button.addValueChangeHandler(handler);
return button;
}
use of org.gwtbootstrap3.client.ui.RadioButton in project ovirt-engine by oVirt.
the class HostPopupView method createSpmControls.
private void createSpmControls(final HostModel object) {
Row labelRow = (Row) spmContainer.getWidget(0);
spmContainer.clear();
spmContainer.add(labelRow);
Iterable<?> items = object.getSpmPriority().getItems();
if (items == null) {
return;
}
// Recreate SPM related controls.
for (Object item : items) {
@SuppressWarnings("unchecked") final EntityModel<Integer> model = (EntityModel<Integer>) item;
// $//$NON-NLS-1$
RadioButton rb = new RadioButton("spm");
rb.setText(model.getTitle());
Element labelElement = (Element) rb.getElement().getChild(1);
labelElement.addClassName(style.patternFlyRadio());
rb.setValue(object.getSpmPriority().getSelectedItem() == model);
rb.addValueChangeHandler(e -> object.getSpmPriority().setSelectedItem(model));
Row row = new Row();
Column column = new Column(ColumnSize.SM_12, rb);
row.add(column);
spmContainer.add(row);
}
}
use of org.gwtbootstrap3.client.ui.RadioButton in project ovirt-engine by oVirt.
the class DisksContentTypeRadioGroup method getRadioGroupPanel.
private Widget getRadioGroupPanel() {
buttonToType = new LinkedHashMap<>();
// $NON-NLS-1$
RadioButton allButton = new RadioButton(BUTTON_GROUP_NAME);
buttonToType.put(allButton, null);
allButton.setText(constants.allDisksLabel());
for (DiskContentType contentType : DiskContentType.values()) {
// $NON-NLS-1$
RadioButton button = new RadioButton(BUTTON_GROUP_NAME);
buttonToType.put(button, contentType);
}
ButtonGroup buttonGroup = new ButtonGroup();
buttonGroup.setDataToggle(Toggle.BUTTONS);
buttonToType.entrySet().forEach(e -> {
buttonGroup.add(e.getKey());
e.getKey().addClickHandler(event -> fireChangeHandlers(e.getValue()));
});
setDiskContentType(null);
localize();
// $NON-NLS-1$
buttonGroup.addStyleName("disk-type-buttons-group");
return buttonGroup;
}
use of org.gwtbootstrap3.client.ui.RadioButton in project ovirt-engine by oVirt.
the class DisksViewRadioGroup method getRadioGroupPanel.
private Widget getRadioGroupPanel() {
allButton = new RadioButton(GROUP_NAME);
allButton.setText(constants.allDisksLabel());
allButton.setActive(true);
allButton.addClickHandler(event -> fireChangeHandlers(null));
imagesButton = new RadioButton(GROUP_NAME);
imagesButton.setText(constants.imageDisksLabel());
imagesButton.addClickHandler(event -> fireChangeHandlers(DiskStorageType.IMAGE));
lunsButton = new RadioButton(GROUP_NAME);
lunsButton.setText(constants.lunDisksLabel());
lunsButton.addClickHandler(event -> fireChangeHandlers(DiskStorageType.LUN));
cinderButton = new RadioButton(GROUP_NAME);
cinderButton.setText(constants.cinderDisksLabel());
cinderButton.addClickHandler(event -> fireChangeHandlers(DiskStorageType.CINDER));
ButtonGroup buttonGroup = new ButtonGroup();
buttonGroup.setDataToggle(Toggle.BUTTONS);
buttonGroup.add(allButton);
buttonGroup.add(imagesButton);
buttonGroup.add(lunsButton);
buttonGroup.add(cinderButton);
// $NON-NLS-1$
buttonGroup.addStyleName("disk-type-buttons-group");
return buttonGroup;
}
Aggregations