public void setLabel(String label) { HTMLElement[] elements = button.getElementsByClassName("style-scope paper-radio-button"); for (int i = 0; i < elements.length; i++) { HTMLElement el = elements[i]; if (el.getAttribute("id").equals("radioLabel")) { el.setInnerHTML(label); break; } } }
public void setOffColor(String offColor) { if (offColor != null) { this.offColor = offColor; HTMLElement[] elements = button.getElementsByClassName("style-scope paper-radio-button"); for (int i = 0; i < elements.length; i++) { HTMLElement el = elements[i]; if (el.getAttribute("id").equals("offRadio")) { el.setAttribute("style", "border-color: " + offColor + ";"); } } } }