/** * @see #RadioButtonToggle(String, SafeHtml) * * @param name * the group name with which to associate the radio button * @param label * this radio button's html label * @param dir * the text's direction. Note that {@code DEFAULT} means * direction should be inherited from the widget's parent * element. */ public RadioButton(String name, SafeHtml label, Direction dir) { this(name); setHTML(label, dir); }
/** * @see #RadioButtonToggle(String, SafeHtml) * * @param name * the group name with which to associate the radio button * @param label * this radio button's html label * @param dir * the text's direction. Note that {@code DEFAULT} means * direction should be inherited from the widget's parent * element. */ public RadioButton(String name, SafeHtml label, Direction dir) { this(name); setHTML(label, dir); }
/** * 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 RadioButton(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 RadioButton(String name, String label, boolean asHTML) { this(name); if (asHTML) { setHTML(label); } else { setText(label); } }
/** * @see #RadioButtonToggle(String, SafeHtml) * * @param name * the group name with which to associate the radio button * @param label * this radio button's html label * @param directionEstimator * A DirectionEstimator object used for automatic direction * adjustment. For convenience, * {@link #DEFAULT_DIRECTION_ESTIMATOR} can be used. */ public RadioButton(String name, SafeHtml label, DirectionEstimator directionEstimator) { this(name); setDirectionEstimator(directionEstimator); setHTML(label.asString()); }
/** * @see #RadioButtonToggle(String, SafeHtml) * * @param name * the group name with which to associate the radio button * @param label * this radio button's html label * @param directionEstimator * A DirectionEstimator object used for automatic direction * adjustment. For convenience, * {@link #DEFAULT_DIRECTION_ESTIMATOR} can be used. */ public RadioButton(String name, SafeHtml label, DirectionEstimator directionEstimator) { this(name); setDirectionEstimator(directionEstimator); setHTML(label.asString()); }
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; }