/** Returns the selected radio button. */ public Radio getSelectedItem() { return _jsel >= 0 ? getItemAtIndex(_jsel) : null; }
/** Removes the child radio button in the radio group at the given index. * @return the removed radio button. */ public Radio removeItemAt(int index) { final Radio item = getItemAtIndex(index); if (item != null && !removeExternal(item)) { final Component p = item.getParent(); if (p != null) p.removeChild(item); } return item; }
/** Deselects all of the currently selected radio button and selects * the radio button with the given index. */ public void setSelectedIndex(int jsel) { if (jsel < 0) jsel = -1; if (_jsel != jsel) { if (jsel < 0) { Radio r = getSelectedItem(); if (r != null) r.setSelected(false); } else { getItemAtIndex(jsel).setSelected(true); } } }
/** * When a radio button is selected, its associated patient list is activated. */ public void onCheck$rgrpLists() { Radio radio = rgrpLists.getSelectedItem(); if (radio == null) { radio = rgrpLists.getItemAtIndex(0); rgrpLists.setSelectedItem(radio); } IPatientList list = (IPatientList) radio.getAttribute(ATTR_PATIENT_LIST); setActiveList(list); }