1 6 package org.netbeans.test.subversion.operators; 7 8 import org.netbeans.jellytools.NbDialogOperator; 9 import org.netbeans.jemmy.operators.*; 10 11 16 public class CreateNewFolderOperator extends NbDialogOperator { 17 18 21 public CreateNewFolderOperator() { 22 super("Specify a new folder"); 23 } 24 25 private JLabelOperator _lblFolderName; 26 private JTextFieldOperator _txtFolderName; 27 private JButtonOperator _btOK; 28 private JButtonOperator _btCancel; 29 30 31 35 38 public JLabelOperator lblFolderName() { 39 if (_lblFolderName==null) { 40 _lblFolderName = new JLabelOperator(this, "Folder name:"); 41 } 42 return _lblFolderName; 43 } 44 45 48 public JTextFieldOperator txtFolderName() { 49 if (_txtFolderName==null) { 50 _txtFolderName = new JTextFieldOperator(this); 51 } 52 return _txtFolderName; 53 } 54 55 58 public JButtonOperator btOK() { 59 if (_btOK==null) { 60 _btOK = new JButtonOperator(this, "OK"); 61 } 62 return _btOK; 63 } 64 65 68 public JButtonOperator btCancel() { 69 if (_btCancel==null) { 70 _btCancel = new JButtonOperator(this, "Cancel"); 71 } 72 return _btCancel; 73 } 74 75 76 80 83 public String getFolderName() { 84 return txtFolderName().getText(); 85 } 86 87 90 public void setFolderName(String text) { 91 txtFolderName().setText(text); 92 } 93 94 97 public void typeFolderName(String text) { 98 txtFolderName().typeText(text); 99 } 100 101 103 public void ok() { 104 btOK().push(); 105 } 106 107 109 public void cancel() { 110 btCancel().push(); 111 } 112 113 114 118 121 public void verify() { 122 lblFolderName(); 123 txtFolderName(); 124 btOK(); 125 btCancel(); 126 } 127 } 128 129 | Popular Tags |