Inheritance diagram for DiagnosisEditor:
Public Member Functions | |
DiagnosisEditor (int active, Vector diagnoses, String prefix, Form form) | |
void | save () |
void | loadDefaults () |
void | loadValues () |
void | display (boolean hidden) |
Public Attributes | |
int | active |
Vector | diagnoses |
ActionButton | action |
TextBox | name |
TextBox | description |
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 3 of file DiagnosisEditor.java.
|
Definition at line 18 of file DiagnosisEditor.java. References action, Widget::addChild(), description, Widget::n(), and name. 00019 { 00020 super(prefix, form); 00021 this.active = active; 00022 this.diagnoses = diagnoses; 00023 name = new TextBox(0,40, n("name"), form); 00024 description = new TextBox(10, 40, n("description"), form); 00025 action = new ActionButton(n("action"), form); 00026 00027 addChild(name); 00028 addChild(description); 00029 addChild(action); 00030 }
|
|
Reimplemented from Widget. Definition at line 77 of file DiagnosisEditor.java. References action, CANCEL, description, ActionButton::display(), TextBox::display(), name, Widget::p(), SAVE, and SAVEADD. 00078 { 00079 if (hidden) 00080 { 00081 name.display(true); 00082 description.display(true); 00083 action.display(true); 00084 return; 00085 } 00086 p( 00087 "\n"+ 00088 "<h4>Diagnosis</h4>\n"+ 00089 "<table>\n"+ 00090 "<tr>\n"+ 00091 " <td valign=top>Name:</td>\n"+ 00092 " <td>"); name.display(); p("</td>\n"+ 00093 "</tr>\n"+ 00094 "<tr>\n"+ 00095 " <td valign=top>Description:</td>\n"+ 00096 " <td>"); description.display(); p("</td>\n"+ 00097 "</tr>\n"+ 00098 "<tr>\n"+ 00099 " <td> </td>\n"+ 00100 " <td>\n"+ 00101 ""); 00102 action.display("Save", SAVE); 00103 action.display("Save and Add Another", SAVEADD); 00104 action.display("Cancel", CANCEL); p("\n"+ 00105 " </td>\n"+ 00106 "</tr>\n"+ 00107 "</table>\n"+ 00108 ""); 00109 }
|
|
Reimplemented from Widget. Definition at line 49 of file DiagnosisEditor.java. References active, Diagnosis::description, description, diagnoses, Diagnosis::name, name, and TextBox::text. 00050 { 00051 if (active < 0) return; 00052 Diagnosis load = (Diagnosis) diagnoses.get(active); 00053 name.text = load.name; 00054 description.text = load.description; 00055 }
|
|
Reimplemented from Widget. Definition at line 57 of file DiagnosisEditor.java. References ActionButton::action, action, CANCEL, done, more, save(), SAVE, and SAVEADD. 00058 { 00059 super.loadValues(); 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 32 of file DiagnosisEditor.java. References active, description, Diagnosis::description, diagnoses, name, Diagnosis::name, and TextBox::text. 00033 { 00034 Diagnosis d; 00035 if (active < 0) 00036 { 00037 d = new Diagnosis(); 00038 diagnoses.add(d); 00039 } 00040 else 00041 { 00042 d = (Diagnosis) diagnoses.get(active); 00043 } 00044 00045 d.name = name.text; 00046 d.description = description.text; 00047 }
|
|
Definition at line 7 of file DiagnosisEditor.java. |
|
Definition at line 5 of file DiagnosisEditor.java. |
|
Definition at line 11 of file DiagnosisEditor.java. |
|
Definition at line 13 of file DiagnosisEditor.java. |
|
Definition at line 6 of file DiagnosisEditor.java. |
|
Definition at line 15 of file DiagnosisEditor.java. |
|
Definition at line 16 of file DiagnosisEditor.java. |
|
Reimplemented from Widget. Definition at line 13 of file DiagnosisEditor.java. |
|
Definition at line 9 of file DiagnosisEditor.java. |
|
Definition at line 10 of file DiagnosisEditor.java. |