1 19 20 package org.netbeans.test.j2ee.addmethod; 21 22 import org.netbeans.jellytools.Bundle; 23 import org.netbeans.jemmy.operators.*; 24 import org.netbeans.jemmy.util.NameComponentChooser; 25 26 31 public class CallEnterpriseBeanDialog extends JDialogOperator { 32 33 36 public CallEnterpriseBeanDialog() { 37 super(Bundle.getStringTrimmed("org.netbeans.modules.j2ee.ejbcore.ui.logicalview.entres.Bundle", "LBL_CallEjbAction")); 38 } 39 40 private JCheckBoxOperator _cbConvertCheckedExceptionsToRuntimeException; 41 private JRadioButtonOperator _rbGenerateInlineLookupCode; 42 private JRadioButtonOperator _rbExistingClass; 43 private JTextFieldOperator _txtExistingClass; 44 private JTreeOperator _tree; 45 private JTextFieldOperator _txtReferenceName; 46 private JRadioButtonOperator _rbLocal; 47 private JRadioButtonOperator _rbRemote; 48 private JButtonOperator _btOK; 49 private JButtonOperator _btCancel; 50 51 52 56 59 public JCheckBoxOperator cbConvertCheckedExceptionsToRuntimeException() { 60 if (_cbConvertCheckedExceptionsToRuntimeException==null) { 61 _cbConvertCheckedExceptionsToRuntimeException = new JCheckBoxOperator(this, Bundle.getStringTrimmed("org.netbeans.modules.j2ee.ejbcore.ui.logicalview.entres.Bundle", "LBL_ConvertToRuntime")); 62 } 63 return _cbConvertCheckedExceptionsToRuntimeException; 64 } 65 66 69 public JRadioButtonOperator rbGenerateInlineLookupCode() { 70 if (_rbGenerateInlineLookupCode==null) { 71 _rbGenerateInlineLookupCode = new JRadioButtonOperator(this, "Generate Inline Lookup Code"); 72 } 73 return _rbGenerateInlineLookupCode; 74 } 75 76 79 public JRadioButtonOperator rbExistingClass() { 80 if (_rbExistingClass==null) { 81 _rbExistingClass = new JRadioButtonOperator(this, "Existing Class"); 82 } 83 return _rbExistingClass; 84 } 85 86 89 public JTextFieldOperator txtExistingClass() { 90 if (_txtExistingClass==null) { 91 _txtExistingClass = new JTextFieldOperator(this); 92 } 93 return _txtExistingClass; 94 } 95 96 99 public JTreeOperator tree() { 100 if (_tree==null) { 101 _tree = new JTreeOperator(this); 102 } 103 return _tree; 104 } 105 106 109 public JTextFieldOperator txtReferenceName() { 110 if (_txtReferenceName==null) { 111 _txtReferenceName = new JTextFieldOperator(this, 2); 112 } 113 return _txtReferenceName; 114 } 115 116 119 public JRadioButtonOperator rbLocal() { 120 if (_rbLocal==null) { 121 _rbLocal = new JRadioButtonOperator(this, "Local"); 122 } 123 return _rbLocal; 124 } 125 126 129 public JRadioButtonOperator rbRemote() { 130 if (_rbRemote==null) { 131 _rbRemote = new JRadioButtonOperator(this, "Remote"); 132 } 133 return _rbRemote; 134 } 135 136 139 public JButtonOperator btOK() { 140 if (_btOK==null) { 141 _btOK = new JButtonOperator(this, "OK"); 142 } 143 return _btOK; 144 } 145 146 149 public JButtonOperator btCancel() { 150 if (_btCancel==null) { 151 _btCancel = new JButtonOperator(this, "Cancel"); 152 } 153 return _btCancel; 154 } 155 156 157 161 164 public void checkConvertCheckedExceptionsToRuntimeException(boolean state) { 165 if (cbConvertCheckedExceptionsToRuntimeException().isSelected()!=state) { 166 cbConvertCheckedExceptionsToRuntimeException().push(); 167 } 168 } 169 170 172 public void generateInlineLookupCode() { 173 rbGenerateInlineLookupCode().push(); 174 } 175 176 178 public void existingClass() { 179 rbExistingClass().push(); 180 } 181 182 185 public String getExistingClass() { 186 return txtExistingClass().getText(); 187 } 188 189 192 public void setExistingClass(String text) { 193 txtExistingClass().setText(text); 194 } 195 196 199 public void typeExistingClass(String text) { 200 txtExistingClass().typeText(text); 201 } 202 203 206 public String getReferenceName() { 207 return txtReferenceName().getText(); 208 } 209 210 213 public void setReferenceName(String text) { 214 txtReferenceName().setText(text); 215 } 216 217 220 public void typeReferenceName(String text) { 221 txtReferenceName().typeText(text); 222 } 223 224 226 public void clearReferenceName() { 227 txtReferenceName().clearText(); 228 } 229 230 232 public void local() { 233 rbLocal().push(); 234 } 235 236 238 public void remote() { 239 rbRemote().push(); 240 } 241 242 244 public void ok() { 245 btOK().push(); 246 } 247 248 250 public void cancel() { 251 btCancel().push(); 252 } 253 254 255 259 262 public void verify() { 263 cbConvertCheckedExceptionsToRuntimeException(); 264 rbGenerateInlineLookupCode(); 265 rbExistingClass(); 266 txtExistingClass(); 267 tree(); 268 txtReferenceName(); 269 rbLocal(); 270 rbRemote(); 271 btOK(); 272 btCancel(); 273 } 274 275 279 public static void main(String args[]) { 280 new CallEnterpriseBeanDialog().verify(); 281 System.out.println("CallEnterpriseBean verification finished."); 282 } 283 } 284 285 | Popular Tags |