| 1 19 20 package org.netbeans.qa.form; 21 22 import org.netbeans.jemmy.operators.*; 23 24 30 public class PaletteManagerOperator extends JDialogOperator { 31 32 34 public PaletteManagerOperator() { 35 super("Palette Manager"); } 37 38 private JLabelOperator _lblPaletteContent; 39 private JTreeOperator _treePaletteContentsTree; 40 private JLabelOperator _lblJLabel; 41 private JButtonOperator _btMoveUp; 42 private JButtonOperator _btMoveDown; 43 private JButtonOperator _btRemove; 44 private JButtonOperator _btNewCategory; 45 private JButtonOperator _btAddFromJAR; 46 private JButtonOperator _btAddFromLibrary; 47 private JButtonOperator _btAddFromProject; 48 private JButtonOperator _btResetPalette; 49 private JButtonOperator _btClose; 50 51 52 56 59 public JLabelOperator lblPaletteContent() { 60 if (_lblPaletteContent==null) { 61 _lblPaletteContent = new JLabelOperator(this, "Palette Content:"); } 63 return _lblPaletteContent; 64 } 65 66 69 public JTreeOperator treePaletteContentsTree() { 70 if (_treePaletteContentsTree==null) { 71 _treePaletteContentsTree = new JTreeOperator(this); 72 } 73 return _treePaletteContentsTree; 74 } 75 76 79 public JLabelOperator lblJLabel() { 80 if (_lblJLabel==null) { 81 _lblJLabel = new JLabelOperator(this, " ", 1); } 83 return _lblJLabel; 84 } 85 86 89 public JButtonOperator btMoveUp() { 90 if (_btMoveUp==null) { 91 _btMoveUp = new JButtonOperator(this, "Move Up"); } 93 return _btMoveUp; 94 } 95 96 99 public JButtonOperator btMoveDown() { 100 if (_btMoveDown==null) { 101 _btMoveDown = new JButtonOperator(this, "Move Down"); } 103 return _btMoveDown; 104 } 105 106 109 public JButtonOperator btRemove() { 110 if (_btRemove==null) { 111 _btRemove = new JButtonOperator(this, "Remove..."); } 113 return _btRemove; 114 } 115 116 119 public JButtonOperator btNewCategory() { 120 if (_btNewCategory==null) { 121 _btNewCategory = new JButtonOperator(this, "New Category..."); } 123 return _btNewCategory; 124 } 125 126 129 public JButtonOperator btAddFromJAR() { 130 if (_btAddFromJAR==null) { 131 _btAddFromJAR = new JButtonOperator(this, "Add from JAR..."); } 133 return _btAddFromJAR; 134 } 135 136 139 public JButtonOperator btAddFromLibrary() { 140 if (_btAddFromLibrary==null) { 141 _btAddFromLibrary = new JButtonOperator(this, "Add from Library..."); } 143 return _btAddFromLibrary; 144 } 145 146 149 public JButtonOperator btAddFromProject() { 150 if (_btAddFromProject==null) { 151 _btAddFromProject = new JButtonOperator(this, "Add from Project..."); } 153 return _btAddFromProject; 154 } 155 156 159 public JButtonOperator btResetPalette() { 160 if (_btResetPalette==null) { 161 _btResetPalette = new JButtonOperator(this, "Reset Palette"); } 163 return _btResetPalette; 164 } 165 166 169 public JButtonOperator btClose() { 170 if (_btClose==null) { 171 _btClose = new JButtonOperator(this, "Close"); } 173 return _btClose; 174 } 175 176 177 181 183 public void moveUp() { 184 btMoveUp().push(); 185 } 186 187 189 public void moveDown() { 190 btMoveDown().push(); 191 } 192 193 195 public void remove() { 196 btRemove().push(); 197 } 198 199 201 public void newCategory() { 202 btNewCategory().push(); 203 } 204 205 207 public void addFromJAR() { 208 btAddFromJAR().push(); 209 } 210 211 213 public void addFromLibrary() { 214 btAddFromLibrary().push(); 215 } 216 217 219 public void addFromProject() { 220 btAddFromProject().push(); 221 } 222 223 225 public void resetPalette() { 226 btResetPalette().push(); 227 } 228 229 231 public void close() { 232 btClose().push(); 233 } 234 235 236 240 242 public void verify() { 243 lblPaletteContent(); 244 treePaletteContentsTree(); 245 lblJLabel(); 246 btMoveUp(); 247 btMoveDown(); 248 btRemove(); 249 btNewCategory(); 250 btAddFromJAR(); 251 btAddFromLibrary(); 252 btAddFromProject(); 253 btResetPalette(); 254 btClose(); 255 } 256 } 257 258 | Popular Tags |