00001 00066 package com.arcle.rmt.superwaba.vc.rqml; 00067 00068 import superwaba.ext.xplat.ui.MultiEdit; 00069 00070 import waba.ui.ComboBox; 00071 import waba.ui.Control; 00072 import waba.ui.Label; 00073 import waba.ui.Edit; 00074 import com.arcle.rmt.rqml.RQMLFirstClass; 00075 import com.arcle.rmt.rqml.Project; 00076 00085 public class ProjectAttributes3 extends FirstClassPanel { 00086 //---------------------------------------------------------------------- 00087 // Implemented Abstract Methods 00088 00089 public void loadData(RQMLFirstClass elem) { 00090 if(elem instanceof Project) { 00091 Project prj = (Project) elem; 00092 edName.setText(prj.getProduct().getName().getString()); 00093 edDescription.setText(prj.getProduct().getDescription().getString()); 00094 } 00095 } 00096 00097 public void saveData(RQMLFirstClass elem) { 00098 if(elem instanceof Project) { 00099 Project prj = (Project) elem; 00100 prj.getProduct().getName().setString(edName.getText()); 00101 prj.getProduct().getDescription().setString(edDescription.getText()); 00102 } 00103 } 00104 00105 //---------------------------------------------------------------------- 00106 // Overidden methods 00107 00108 protected void initChildren() 00109 { 00110 lbName = createLabel("Name:"); 00111 lbDescription = createLabel("Description:"); 00112 00113 edName = createEdit(""); 00114 edDescription = createMultiEdit("", 7, 2); 00115 } 00116 00117 00118 protected Control[][] getFormControls() { 00119 Control[][] children = new Control[][] { 00120 {lbName, edName}, 00121 {lbDescription, edDescription} 00122 }; 00123 return children; 00124 } 00125 00126 public String getCaption() { 00127 return "Product"; 00128 } 00129 00130 private Label lbName; 00131 private Label lbDescription; 00132 00133 private Edit edName; 00134 private MultiEdit edDescription; 00135 }