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 RepositoryBrowserOperator extends NbDialogOperator { 19 20 22 public RepositoryBrowserOperator() { 23 super("Browse Repository"); 24 } 25 26 private TreeTableOperator _tree; 27 private JLabelOperator _lblSpecifyFolderToCheckout; 28 private JButtonOperator _btOK; 29 private JButtonOperator _btCancel; 30 private JButtonOperator _btHelp; 31 32 33 37 40 public TreeTableOperator tree() { 41 if (_tree == null) { 42 _tree= new TreeTableOperator(this); 43 } 44 return _tree; 45 } 46 47 50 public JLabelOperator lblSpecifyFolderToCheckout() { 51 if (_lblSpecifyFolderToCheckout==null) { 52 _lblSpecifyFolderToCheckout = new JLabelOperator(this); 53 } 54 return _lblSpecifyFolderToCheckout; 55 } 56 57 61 64 public void selectFolder(String path) { 65 new Node(tree().tree(), path).select(); 66 } 67 68 71 public JButtonOperator btOK() { 72 if (_btOK==null) { 73 _btOK = new JButtonOperator(this, "OK"); 74 } 75 return _btOK; 76 } 77 78 81 public JButtonOperator btCancel() { 82 if (_btCancel==null) { 83 _btCancel = new JButtonOperator(this, "Cancel"); 84 } 85 return _btCancel; 86 } 87 88 91 public JButtonOperator btHelp() { 92 if (_btHelp==null) { 93 _btHelp = new JButtonOperator(this, "Help"); 94 } 95 return _btHelp; 96 } 97 98 99 103 105 public void ok() { 106 btOK().push(); 107 } 108 109 111 public void cancel() { 112 btCancel().push(); 113 } 114 115 117 public void help() { 118 btHelp().push(); 119 } 120 121 122 126 128 public void verify() { 129 tree(); 130 lblSpecifyFolderToCheckout(); 131 btOK(); 132 btCancel(); 133 btHelp(); 134 } 135 } 136 137 | Popular Tags |