/** * Creates a new radio associated with a particular group, and initialized * with the given HTML label. All radio buttons associated with the same * group name belong to a mutually-exclusive set. * * Radio buttons are grouped by their name attribute, so changing their name * using the setName() method will also change their associated group. * * @param name * the group name with which to associate the radio button * @param label * this radio button's label */ public Radio(String name, String label) { this(name); setText(label); }
/** * @see #RadioButton(String, SafeHtml) * * @param name * the group name with which to associate the radio button * @param label * this radio button's label * @param dir * the text's direction. Note that {@code DEFAULT} means * direction should be inherited from the widget's parent * element. */ public Radio(String name, String label, Direction dir) { this(name); setText(label, dir); }
/** * @see #RadioButton(String, SafeHtml) * * @param name * the group name with which to associate the radio button * @param label * this radio button's label * @param dir * the text's direction. Note that {@code DEFAULT} means * direction should be inherited from the widget's parent * element. */ public Radio(String name, String label, Direction dir) { this(name); setText(label, dir); }
/** * Creates a new radio associated with a particular group, and initialized * with the given HTML label. All radio buttons associated with the same * group name belong to a mutually-exclusive set. * * Radio buttons are grouped by their name attribute, so changing their name * using the setName() method will also change their associated group. * * @param name * the group name with which to associate the radio button * @param label * this radio button's label */ public Radio(String name, String label) { this(name); setText(label); }
/** * @see #RadioButton(String, SafeHtml) * * @param name * the group name with which to associate the radio button * @param label * this radio button's label * @param directionEstimator * A DirectionEstimator object used for automatic direction * adjustment. For convenience, * {@link #DEFAULT_DIRECTION_ESTIMATOR} can be used. */ public Radio(String name, String label, DirectionEstimator directionEstimator) { this(name); setDirectionEstimator(directionEstimator); setText(label); }
/** * @see #RadioButton(String, SafeHtml) * * @param name * the group name with which to associate the radio button * @param label * this radio button's label * @param directionEstimator * A DirectionEstimator object used for automatic direction * adjustment. For convenience, * {@link #DEFAULT_DIRECTION_ESTIMATOR} can be used. */ public Radio(String name, String label, DirectionEstimator directionEstimator) { this(name); setDirectionEstimator(directionEstimator); setText(label); }
/** * Creates a new radio button associated with a particular group, and * initialized with the given label (optionally treated as HTML). All radio * buttons associated with the same group name belong to a * mutually-exclusive set. * * Radio buttons are grouped by their name attribute, so changing their name * using the setName() method will also change their associated group. * * @param name * name the group with which to associate the radio button * @param label * this radio button's label * @param asHTML * <code>true</code> to treat the specified label as HTML */ public Radio(String name, String label, boolean asHTML) { this(name); if (asHTML) { setHTML(label); } else { setText(label); } }
/** * Creates a new radio button associated with a particular group, and * initialized with the given label (optionally treated as HTML). All radio * buttons associated with the same group name belong to a * mutually-exclusive set. * * Radio buttons are grouped by their name attribute, so changing their name * using the setName() method will also change their associated group. * * @param name * name the group with which to associate the radio button * @param label * this radio button's label * @param asHTML * <code>true</code> to treat the specified label as HTML */ public Radio(String name, String label, boolean asHTML) { this(name); if (asHTML) { setHTML(label); } else { setText(label); } }
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()); } }
@Override public void init(Presenter container) { this.container = container; modelCreator.setText(container.getFormModelLabel()); DOMUtil.removeAllChildren(viewContainer); UberElement creationView = container.getCreationView(); hasCreationView = creationView != null; if (hasCreationView) { viewContainer.appendChild(creationView.getElement()); } }