@Override public HandlerRegistration addValueChangeHandler(ValueChangeHandler<String> handler) { initValueChangeHandler(); return addHandler(handler, ValueChangeEvent.getType()); }
/** * Adds a new radio button to this radioset using the given string for both * the value and the text. Returns a JQMRadio instance which can be used to * change the value and label of the radio button. * * This method is the same as calling addRadio(String, String) with the same * string twice. * * @param value * the value to associate with this radio option. This will be * the value returned by methods that query the selected value. * The value will also be used for the label. * * @return a JQMRadio instance to adjust the added radio button */ public JQMRadio addRadio(String value) { return addRadio(value, value); }
/** * no-op implementation required for {@link JQMFormWidget} */ @Override public HandlerRegistration addBlurHandler(final BlurHandler handler) { this.blurHandler = handler; clearBlurHandlers(); addRadiosBlurHandler(handler); return null; }
public void clear() { radios.clear(); setupFieldset(getText()); valueChangeHandlerInitialized = false; // based on radios }
private void setupFieldset(String labelText) { if (fieldset != null) { boolean horz = fieldset.isHorizontal(); boolean vert = fieldset.isVertical(); IconPos iconPos = getIconPos(); boolean mini = isMini(); remove(fieldset); fieldset = new JQMFieldset(); if (horz) fieldset.setHorizontal(); if (vert) fieldset.setVertical(); setIconPos(iconPos); setMini(mini); } else { // the fieldset is the inner container and is contained inside the flow fieldset = new JQMFieldset(); } fieldset.getElement().setId(Document.get().createUniqueId()); add(fieldset); // the legend must be added to the fieldset legend = new Legend(); legend.setText(labelText); fieldset.add(legend); }
String oldValue = fireEvents ? getValue() : null; boolean changed = false; for (JQMRadio r : radios) { // first we have to uncheck already checked radios (UI refresh issue) TextBox radio = r.getInput(); if (!isChecked(radio)) continue; boolean checked = value != null && value.equals(radio.getValue()) ? true : false; if (!checked) { setChecked(radio, false); changed = true; TextBox radio = r.getInput(); boolean checked = value != null && value.equals(radio.getValue()) ? true : false; if (isChecked(radio) != checked) { setChecked(radio, checked); changed = true; String newValue = getValue(); boolean eq = newValue == oldValue || newValue != null && newValue.equals(oldValue); if (!eq) {
/** * Alias for getValue() */ public String getSelectedValue() { return getValue(); }
@Override protected void onUnload() { clearBlurHandlers(); super.onUnload(); }
@Override protected void onLoad() { super.onLoad(); if (blurHandler != null && blurHandlers.size() == 0) addRadiosBlurHandler(blurHandler); }
@Override public HandlerRegistration addClickHandler(ClickHandler handler) { return addDomHandler(handler, ClickEvent.getType()); }
private void setupFieldset(String labelText) { if (fieldset != null) { boolean horz = fieldset.isHorizontal(); boolean vert = fieldset.isVertical(); IconPos iconPos = getIconPos(); boolean mini = isMini(); remove(fieldset); fieldset = new JQMFieldset(); if (horz) fieldset.setHorizontal(); if (vert) fieldset.setVertical(); setIconPos(iconPos); setMini(mini); } else { // the fieldset is the inner container and is contained inside the flow fieldset = new JQMFieldset(); } fieldset.getElement().setId(Document.get().createUniqueId()); add(fieldset); // the legend must be added to the fieldset legend = new Legend(); legend.setText(labelText); fieldset.add(legend); }
String oldValue = fireEvents ? getValue() : null; boolean changed = false; for (JQMRadio r : radios) { // first we have to uncheck already checked radios (UI refresh issue) TextBox radio = r.getInput(); if (!isChecked(radio)) continue; boolean checked = value != null && value.equals(radio.getValue()) ? true : false; if (!checked) { setChecked(radio, false); changed = true; TextBox radio = r.getInput(); boolean checked = value != null && value.equals(radio.getValue()) ? true : false; if (isChecked(radio) != checked) { setChecked(radio, checked); changed = true; String newValue = getValue(); boolean eq = newValue == oldValue || newValue != null && newValue.equals(oldValue); if (!eq) {
public void clear() { radios.clear(); setupFieldset(getText()); valueChangeHandlerInitialized = false; // based on radios }
/** * Alias for getValue() */ public String getSelectedValue() { return getValue(); }
@Override protected void onUnload() { clearBlurHandlers(); super.onUnload(); }
@Override protected void onLoad() { super.onLoad(); if (blurHandler != null && blurHandlers.size() == 0) addRadiosBlurHandler(blurHandler); }
@Override public HandlerRegistration addClickHandler(ClickHandler handler) { return addDomHandler(handler, ClickEvent.getType()); }
private void setupFieldset(String labelText) { if (fieldset != null) { boolean horz = fieldset.isHorizontal(); boolean vert = fieldset.isVertical(); IconPos iconPos = getIconPos(); boolean mini = isMini(); remove(fieldset); fieldset = new JQMFieldset(); if (horz) fieldset.setHorizontal(); if (vert) fieldset.setVertical(); setIconPos(iconPos); setMini(mini); } else { // the fieldset is the inner container and is contained inside the flow fieldset = new JQMFieldset(); } fieldset.getElement().setId(Document.get().createUniqueId()); add(fieldset); // the legend must be added to the fieldset legend = new Legend(); legend.setText(labelText); fieldset.add(legend); }
String oldValue = fireEvents ? getValue() : null; boolean changed = false; for (JQMRadio r : radios) { // first we have to uncheck already checked radios (UI refresh issue) TextBox radio = r.getInput(); if (!isChecked(radio)) continue; boolean checked = value != null && value.equals(radio.getValue()) ? true : false; if (!checked) { setChecked(radio, false); changed = true; TextBox radio = r.getInput(); boolean checked = value != null && value.equals(radio.getValue()) ? true : false; if (isChecked(radio) != checked) { setChecked(radio, checked); changed = true; String newValue = getValue(); boolean eq = newValue == oldValue || newValue != null && newValue.equals(oldValue); if (!eq) {
@Override public HandlerRegistration addSelectionHandler(SelectionHandler<String> handler) { initValueChangeHandler(); return addHandler(handler, SelectionEvent.getType()); }