Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 7 package java.awt; 8 9 40 public class CheckboxGroup implements java.io.Serializable { 41 47 Checkbox selectedCheckbox = null; 48 49 52 private static final long serialVersionUID = 3729780091441768983L; 53 54 57 public CheckboxGroup() { 58 } 59 60 72 public Checkbox getSelectedCheckbox() { 73 return getCurrent(); 74 } 75 76 80 @Deprecated  81 public Checkbox getCurrent() { 82 return selectedCheckbox; 83 } 84 85 101 public void setSelectedCheckbox(Checkbox box) { 102 setCurrent(box); 103 } 104 105 109 @Deprecated  110 public synchronized void setCurrent(Checkbox box) { 111 if (box != null && box.group != this) { 112 return; 113 } 114 Checkbox oldChoice = this.selectedCheckbox; 115 this.selectedCheckbox = box; 116 if (oldChoice != null && oldChoice != box && oldChoice.group == this) { 117 oldChoice.setState(false); 118 } 119 if (box != null && oldChoice != box && !box.getState()) { 120 box.setStateInternal(true); 121 } 122 } 123 124 129 public String toString() { 130 return getClass().getName() + "[selectedCheckbox=" + selectedCheckbox + "]"; 131 } 132 133 } 134
| Popular Tags
|