示例#1
0
 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;
     }
   }
 }
示例#2
0
 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 + ";");
       }
     }
   }
 }