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 ); } }
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 ); } }
protected void addRadioButtons() { boolean first = true; radioButtonList.clear(); for (ScenarioSimulationModel.Type sourceType : ScenarioSimulationModel.Type.values()) { Radio radioButton = new Radio(SOURCE_TYPE); radioButton.setText(sourceType.name()); radioButton.setValue(first); radioButton.addValueChangeHandler(this); first = false; radioButtonList.add(radioButton); add(radioButton); } uploadWidget.setVisible(isDMNSelected()); } }
protected void refreshInput(Map<TYPE, String> optionsValues, TYPE selectedValue) { input.clear(); for (TYPE key : optionsValues.keySet()) { Radio radio; SafeHtml text = getOptionLabel(optionsValues.get(key)); if (field.getInline()) { radio = new InlineRadio(field.getId(), text); } else { radio = new Radio(field.getId(), text); } radio.setFormValue(key.toString()); radio.setEnabled(!field.getReadOnly()); input.add(radio); } if (optionsValues.containsKey(selectedValue)) { input.setValue(selectedValue, true); } }