1 6 package org.netbeans.jellytools.modules.editor; 7 8 import org.netbeans.jemmy.operators.*; 9 import org.netbeans.jemmy.util.NameComponentChooser; 10 11 16 public class CreateNewProfileDialog extends JDialogOperator { 17 18 20 public CreateNewProfileDialog() { 21 super("Create New Profile Dialog"); 22 } 23 24 private JLabelOperator _lblProfileName; 25 private JTextFieldOperator _txtProfileName; 26 private JButtonOperator _btOK; 27 private JButtonOperator _btCancel; 28 29 30 34 37 public JLabelOperator lblProfileName() { 38 if (_lblProfileName==null) { 39 _lblProfileName = new JLabelOperator(this, "Profile Name:"); 40 } 41 return _lblProfileName; 42 } 43 44 47 public JTextFieldOperator txtProfileName() { 48 if (_txtProfileName==null) { 49 _txtProfileName = new JTextFieldOperator(this); 50 } 51 return _txtProfileName; 52 } 53 54 57 public JButtonOperator btOK() { 58 if (_btOK==null) { 59 _btOK = new JButtonOperator(this, "OK"); 60 } 61 return _btOK; 62 } 63 64 67 public JButtonOperator btCancel() { 68 if (_btCancel==null) { 69 _btCancel = new JButtonOperator(this, "Cancel"); 70 } 71 return _btCancel; 72 } 73 74 75 79 82 public String getProfileName() { 83 return txtProfileName().getText(); 84 } 85 86 89 public void setProfileName(String text) { 90 txtProfileName().setText(text); 91 } 92 93 96 public void typeProfileName(String text) { 97 txtProfileName().typeText(text); 98 } 99 100 102 public void ok() { 103 btOK().push(); 104 } 105 106 108 public void cancel() { 109 btCancel().push(); 110 } 111 112 113 117 119 public void verify() { 120 lblProfileName(); 121 txtProfileName(); 122 btOK(); 123 btCancel(); 124 } 125 126 129 public static void main(String args[]) { 130 new CreateNewProfileDialog().verify(); 131 System.out.println("CreateNewProfileDialog verification finished."); 132 } 133 } 134 135 | Popular Tags |