1 6 package org.netbeans.test.subversion.operators; 7 8 import org.netbeans.jellytools.nodes.Node; 9 import org.netbeans.jemmy.operators.*; 10 import org.netbeans.test.subversion.operators.actions.MergeAction; 11 12 17 public class MergeOperator extends JDialogOperator { 18 19 22 public MergeOperator() { 23 super("Merge"); 24 } 25 26 30 public static MergeOperator invoke(Node[] nodes) { 31 new MergeAction().perform(nodes); 32 return new MergeOperator(); 33 } 34 35 39 public static MergeOperator invoke(Node node) { 40 return invoke(new Node[] {node}); 41 } 42 43 private JComboBoxOperator _cboMergeFrom; 44 private JButtonOperator _btMerge; 45 private JButtonOperator _btCancel; 46 private JButtonOperator _btHelp; 47 48 49 53 56 public JComboBoxOperator cboMergeFrom() { 57 if (_cboMergeFrom==null) { 58 _cboMergeFrom = new JComboBoxOperator(this, 1); 59 } 60 return _cboMergeFrom; 61 } 62 63 64 67 public JButtonOperator btMerge() { 68 if (_btMerge==null) { 69 _btMerge = new JButtonOperator(this, "Merge"); 70 } 71 return _btMerge; 72 } 73 74 77 public JButtonOperator btCancel() { 78 if (_btCancel==null) { 79 _btCancel = new JButtonOperator(this, "Cancel"); 80 } 81 return _btCancel; 82 } 83 84 87 public JButtonOperator btHelp() { 88 if (_btHelp==null) { 89 _btHelp = new JButtonOperator(this, "Help"); 90 } 91 return _btHelp; 92 } 93 94 95 99 104 public String getSelectedMergeFrom() { 105 return cboMergeFrom().getSelectedItem().toString(); 106 } 107 108 113 public void selectMergeFrom(String item) { 114 cboMergeFrom().selectItem(item); 115 } 116 117 122 public void setMergeFrom(String text) { 123 cboMergeFrom().clearText(); 124 cboMergeFrom().typeText(text); 125 } 126 } 127 128 | Popular Tags |