Coverage Report - net.sf.jolene.dom.Radio
 
Classes in this File Line Coverage Branch Coverage Complexity
Radio
100%
14/14
N/A
0
 
 1  
 package net.sf.jolene.dom;
 2  
 
 3  
 /**
 4  
  * A radio button in an html document.
 5  
  *
 6  
  * @author Dan Howard
 7  
  * @since Oct 13, 2005 8:25:11 PM
 8  
  */
 9  1
 public final class Radio extends HTMLElement {
 10  
 
 11  
     /**
 12  
      * Default constructor.
 13  
      */
 14  21
     public Radio() {
 15  21
         setAttribute("type", "radio");
 16  21
     }
 17  
 
 18  
 
 19  
     /**
 20  
      * Construct a radio button with the specified name.
 21  
      *
 22  
      * @param name name of the radio button.
 23  
      */
 24  
     public Radio(String name) {
 25  1
         this();
 26  1
         setName(name);
 27  1
     }
 28  
 
 29  
     /**
 30  
      * Returns a clone of the radio button object.
 31  
      *
 32  
      * @return Radio object.
 33  
      */
 34  
     @Override
 35  
     public Radio clone() {
 36  1
         return (Radio) super.clone();
 37  
     }
 38  
 
 39  
     /**
 40  
      * Set the name of the radio button.
 41  
      *
 42  
      * @param name name of the radio button.
 43  
      */
 44  
     @Override
 45  
     public void setName(String name) {
 46  20
         super.setName(name);
 47  20
         setAttribute("name", name);
 48  20
     }
 49  
 
 50  
 
 51  
     /**
 52  
      * Set the value of the radio button.
 53  
      *
 54  
      * @param value name of the radio button.
 55  
      */
 56  
     @Override
 57  
     public void setValue(String value) {
 58  24
         super.setValue(value);
 59  24
         setAttribute("value", value);
 60  24
     }
 61  
 }