1 6 package org.netbeans.test.subversion.operators; 7 8 import org.netbeans.jellytools.NbDialogOperator; 9 import org.netbeans.jellytools.TreeTableOperator; 10 import org.netbeans.jellytools.nodes.Node; 11 import org.netbeans.jemmy.operators.*; 12 13 18 public class RepositoryBrowserImpOperator extends NbDialogOperator { 19 20 23 public RepositoryBrowserImpOperator() { 24 super("Browse Repository"); 25 } 26 27 private TreeTableOperator _tree; 28 private JLabelOperator _lblSpecifyFolderToCheckout; 29 private JButtonOperator _btStop; 30 private JButtonOperator _btNewFolder; 31 private JButtonOperator _btOK; 32 private JButtonOperator _btCancel; 33 private JButtonOperator _btHelp; 34 35 36 40 43 public TreeTableOperator tree() { 44 if (_tree==null) { 45 _tree = new TreeTableOperator(this); 46 } 47 return _tree; 48 } 49 50 53 public JLabelOperator lblSpecifyFolderToCheckout() { 54 if (_lblSpecifyFolderToCheckout==null) { 55 _lblSpecifyFolderToCheckout = new JLabelOperator(this); 56 } 57 return _lblSpecifyFolderToCheckout; 58 } 59 60 63 public JButtonOperator btStop() { 64 if (_btStop==null) { 65 _btStop = new JButtonOperator(this, "Stop"); 66 } 67 return _btStop; 68 } 69 70 73 public JButtonOperator btNewFolder() { 74 if (_btNewFolder==null) { 75 _btNewFolder = new JButtonOperator(this, "New folder"); 76 } 77 return _btNewFolder; 78 } 79 80 83 public JButtonOperator btOK() { 84 if (_btOK==null) { 85 _btOK = new JButtonOperator(this, "OK"); 86 } 87 return _btOK; 88 } 89 90 93 public JButtonOperator btCancel() { 94 if (_btCancel==null) { 95 _btCancel = new JButtonOperator(this, "Cancel"); 96 } 97 return _btCancel; 98 } 99 100 103 public JButtonOperator btHelp() { 104 if (_btHelp==null) { 105 _btHelp = new JButtonOperator(this, "Help"); 106 } 107 return _btHelp; 108 } 109 110 111 115 118 public void selectFolder(String path) { 119 new Node(tree().tree(), path).select(); 120 } 121 122 124 public CreateNewFolderOperator createNewFolder() { 125 btNewFolder().pushNoBlock(); 126 return new CreateNewFolderOperator(); 127 } 128 129 131 public void ok() { 132 btOK().push(); 133 } 134 135 137 public void cancel() { 138 btCancel().push(); 139 } 140 141 143 public void help() { 144 btHelp().push(); 145 } 146 147 148 152 155 public void verify() { 156 tree(); 157 lblSpecifyFolderToCheckout(); 158 btNewFolder(); 159 btOK(); 160 btCancel(); 161 btHelp(); 162 } 163 } 164 165 | Popular Tags |