Inheritance diagram for ReferralEditor:
Public Member Functions | |
ReferralEditor (int active, Vector referrals, String prefix, Form form) | |
void | save () |
void | loadDefaults () |
void | loadValues () |
void | display (boolean hidden) |
Public Attributes | |
int | active |
Vector | referrals |
ActionButton | action |
DoctorSelect | doctor |
boolean | incoming |
Static Public Attributes | |
static final int | SAVE = 1 |
static final int | SAVEADD = 2 |
static final int | CANCEL = 3 |
Package Attributes | |
boolean | done = false |
boolean | more = false |
Definition at line 4 of file ReferralEditor.java.
|
Definition at line 20 of file ReferralEditor.java. References action, Widget::addChild(), doctor, and Widget::n(). 00021 { 00022 super(prefix, form); 00023 this.active = active; 00024 this.referrals = referrals; 00025 action = new ActionButton(n("action"), form); 00026 doctor = new DoctorSelect(0, 7, n("doctor"), form); 00027 addChild(action); 00028 addChild(doctor); 00029 }
|
|
Reimplemented from Widget. Definition at line 77 of file ReferralEditor.java. References action, CANCEL, ActionButton::display(), DoctorSelect::display(), doctor, incoming, Widget::modalChild, Widget::n(), Widget::p(), Widget::printAttribute(), SAVE, and SAVEADD. 00078 { 00079 super.display(hidden); 00080 if (hidden || modalChild != null) 00081 { 00082 printAttribute("incoming", incoming ? "1" : "0"); 00083 return; 00084 } 00085 p( 00086 "\n"+ 00087 "<table>\n"+ 00088 "<tr>\n"+ 00089 " <td>Referral</td>\n"+ 00090 " <td><select name=" + n("incoming") + ">" 00091 + "<option value=1" + (incoming ? " selected" : "") + ">From" 00092 + "<option value=0" + (incoming ? "" : " selected") + ">To" 00093 + "</select></td>\n"+ 00094 " <td>"); doctor.display(); p("</td>\n"+ 00095 "</tr>\n"+ 00096 "<tr>\n"+ 00097 " <td colspan=3 align=center>\n"+ 00098 ""); 00099 action.display("Save", SAVE); 00100 action.display("Save and Add Another", SAVEADD); 00101 action.display("Cancel", CANCEL); p("\n"+ 00102 " </td>\n"+ 00103 "</tr>\n"+ 00104 "</table>\n"+ 00105 ""); 00106 }
|
|
Reimplemented from Widget. Definition at line 48 of file ReferralEditor.java. References active, doctor, Referral::doctor_id, SelectBox::id, Referral::incoming, incoming, and referrals. 00049 { 00050 if (active < 0) return; 00051 Referral load = (Referral) referrals.get(active); 00052 doctor.id = new Integer(load.doctor_id); 00053 incoming = load.incoming; 00054 }
|
|
Reimplemented from Widget. Definition at line 56 of file ReferralEditor.java. References ActionButton::action, action, CANCEL, done, incoming, Widget::loadAttribute(), more, save(), SAVE, SAVEADD, and Widget::toInt(). 00057 { 00058 super.loadValues(); 00059 incoming = toInt(loadAttribute("incoming"), 0) != 0; 00060 00061 switch(action.action) 00062 { 00063 case SAVE: 00064 done = true; 00065 save(); 00066 break; 00067 case CANCEL: 00068 done = true; 00069 break; 00070 case SAVEADD: 00071 more = true; 00072 save(); 00073 break; 00074 } 00075 }
|
|
Definition at line 31 of file ReferralEditor.java. References active, doctor, Referral::doctor_id, SelectBox::id, incoming, Referral::incoming, and referrals. 00032 { 00033 Referral r; 00034 if (active < 0) 00035 { 00036 r = new Referral(); 00037 referrals.add(r); 00038 } 00039 else 00040 { 00041 r = (Referral) referrals.get(active); 00042 } 00043 00044 r.doctor_id = doctor.id.intValue(); // XXX: doctor.id could be null 00045 r.incoming = incoming; 00046 }
|
|
Definition at line 8 of file ReferralEditor.java. |
|
Definition at line 6 of file ReferralEditor.java. |
|
Definition at line 12 of file ReferralEditor.java. |
|
Definition at line 14 of file ReferralEditor.java. |
|
Definition at line 17 of file ReferralEditor.java. |
|
Definition at line 15 of file ReferralEditor.java. |
|
Definition at line 18 of file ReferralEditor.java. |
|
Definition at line 7 of file ReferralEditor.java. |
|
Definition at line 10 of file ReferralEditor.java. |
|
Definition at line 11 of file ReferralEditor.java. |