private void addRadiosBlurHandler(final BlurHandler handler) { for (JQMRadio r : radios) { TextBox radio = r.getInput(); blurHandlers.add(radio.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { handler.onBlur(null); } })); } }
private void addRadiosBlurHandler(final BlurHandler handler) { for (JQMRadio r : radios) { TextBox radio = r.getInput(); blurHandlers.add(radio.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { handler.onBlur(null); } })); } }
private void initValueChangeHandler() { // Initialization code if (!valueChangeHandlerInitialized) { valueChangeHandlerInitialized = true; for (JQMRadio r : radios) { TextBox radio = r.getInput(); radio.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { SelectionEvent.fire(JQMRadioset.this, getValue()); ValueChangeEvent.fire(JQMRadioset.this, getValue()); } }); } } }
private void initValueChangeHandler() { // Initialization code if (!valueChangeHandlerInitialized) { valueChangeHandlerInitialized = true; for (JQMRadio r : radios) { TextBox radio = r.getInput(); radio.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { SelectionEvent.fire(JQMRadioset.this, getValue()); ValueChangeEvent.fire(JQMRadioset.this, getValue()); } }); } } }
private void addRadiosBlurHandler(final BlurHandler handler) { ClickHandler h = null; for (JQMRadio r : radios) { TextBox radio = r.getInput(); if (h == null) h = event -> handler.onBlur(null); blurHandlers.add(radio.addClickHandler(h)); } }
/** * Removes the given {@link JQMRadio} from this radioset * * @param radio - the radio to remove */ public void removeRadio(JQMRadio radio) { if (radio == null) return; TextBox inp = radio.getInput(); if (inp != null) { radios.remove(radio); fieldset.remove(inp); } if (radio.getLabel() != null) fieldset.remove(radio.getLabel()); }
/** * Removes the given {@link JQMRadio} from this radioset * * @param radio - the radio to remove */ public void removeRadio(JQMRadio radio) { if (radio == null) return; TextBox inp = radio.getInput(); if (inp != null) { radios.remove(radio); fieldset.remove(inp); } if (radio.getLabel() != null) fieldset.remove(radio.getLabel()); }
/** * Removes the given {@link JQMRadio} from this radioset * * @param radio - the radio to remove */ public void removeRadio(JQMRadio radio) { if (radio == null) return; TextBox inp = radio.getInput(); if (inp != null) { radios.remove(radio); fieldset.remove(inp); } if (radio.getLabel() != null) fieldset.remove(radio.getLabel()); }
/** * * Note: this method will return null until after the jquery init phase has * completed. That means if you call getValue() on an element in the initial * construction of a page then it will return null. * * @return the value of the currently selected radio button or null if no * button is currently selected. * */ @Override public String getValue() { for (JQMRadio r : radios) { TextBox radio = r.getInput(); Element element = radio.getElement(); if (isChecked(element)) { return element.getAttribute("value"); } } return null; }
/** * * Note: this method will return null until after the jquery init phase has * completed. That means if you call getValue() on an element in the initial * construction of a page then it will return null. * * @return the value of the currently selected radio button or null if no * button is currently selected. * */ @Override public String getValue() { for (JQMRadio r : radios) { TextBox radio = r.getInput(); Element element = radio.getElement(); if (isChecked(element)) { return element.getAttribute("value"); } } return null; }
/** * * Note: this method will return null until after the jquery init phase has * completed. That means if you call getValue() on an element in the initial * construction of a page then it will return null. * * @return the value of the currently selected radio button or null if no * button is currently selected. * */ @Override public String getValue() { for (JQMRadio r : radios) { TextBox radio = r.getInput(); Element element = radio.getElement(); if (isChecked(element)) { return element.getAttribute("value"); } } return null; }
private void initValueChangeHandler() { // Initialization code if (!valueChangeHandlerInitialized) { valueChangeHandlerInitialized = true; final ClickHandler h = event -> { SelectionEvent.fire(JQMRadioset.this, getValue()); ValueChangeEvent.fire(JQMRadioset.this, getValue()); }; for (JQMRadio r : radios) { TextBox radio = r.getInput(); radio.addClickHandler(h); } } }
/** * UiBinder call method to add a radio button * * @param radio */ @UiChild(tagname = "radio") public void addRadio(JQMRadio radio) { radio.setName(fieldset.getId()); radios.add(radio); radio.setTheme(theme); fieldset.add(radio.getInput()); fieldset.add(radio.getLabel()); }
/** * UiBinder call method to add a radio button * * @param radio */ @UiChild(tagname = "radio") public void addRadio(JQMRadio radio) { radio.setName(fieldset.getId()); radios.add(radio); radio.setTheme(theme); fieldset.add(radio.getInput()); fieldset.add(radio.getLabel()); }
/** * UiBinder call method to add a radio button * * @param radio */ @UiChild(tagname = "radio") public void addRadio(JQMRadio radio) { radio.setName(fieldset.getId()); radios.add(radio); radio.setTheme(theme); fieldset.add(radio.getInput()); fieldset.add(radio.getLabel()); }
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; TextBox radio = r.getInput(); boolean checked = value != null && value.equals(radio.getValue()) ? true : false; if (isChecked(radio) != checked) {
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; TextBox radio = r.getInput(); boolean checked = value != null && value.equals(radio.getValue()) ? true : false; if (isChecked(radio) != checked) {
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; TextBox radio = r.getInput(); boolean checked = value != null && value.equals(radio.getValue()) ? true : false; if (isChecked(radio) != checked) {