Changeset 1691 for trunk/autoquest-plugin-jfc/src/main/java
- Timestamp:
- 08/22/14 15:15:32 (10 years ago)
- Location:
- trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/commands/CMDgenerateJacaretoReplay.java
r1689 r1691 32 32 import de.ugoe.cs.autoquest.eventcore.Event; 33 33 import de.ugoe.cs.autoquest.eventcore.gui.*; 34 import de.ugoe.cs.autoquest.keyboardmaps.VirtualKey; 34 35 import de.ugoe.cs.autoquest.plugin.jfc.guimodel.JFCGUIElement; 35 36 import de.ugoe.cs.util.console.Console; … … 207 208 else if (event.getType() instanceof KeyboardFocusChange) { 208 209 writeFocusChangeEvent(writer, event); 210 } 211 else if (event.getType() instanceof KeyPressed) { 212 // writeKeyEvent(writer, event, 401); 213 } 214 else if (event.getType() instanceof KeyReleased) { 215 // writeKeyEvent(writer, event, 402); 209 216 } 210 217 } … … 413 420 } 414 421 } 422 423 private void writeKeyEvent(BufferedWriter writer, Event event, int jacId) throws IOException { 424 KeyInteraction info = (KeyInteraction) event.getType(); 425 JFCGUIElement target = (JFCGUIElement) event.getTarget(); 426 427 //@formatter:off 428 writeLine(writer, 429 "<KeyEvent " 430 + "procTime=\"0\" " 431 + "duration=\"150\" " 432 + "source=\"" + target.getJacaretoHierarchy() + "\" " 433 + "class=\"" + target.getSpecification().getType() + "\" " 434 + "uuid=\"" + UUID.randomUUID() + "\" " 435 + "ID=\"" + jacId + "\" " 436 + "component=\"null\" " 437 + "root=\"" + target.getJacaretoRoot() + "\" " 438 + "xPos=\"0\" " 439 + "yPos=\"0\" " 440 + "width=\"0\" " 441 + "height=\"0\" " 442 + "when=\"" + event.getTimestamp() + "\" " 443 + "isConsumed=\"false\">" 444 ); 445 writeLine(writer, 446 "<KeyInfo " 447 + "keyCode=\"" + getKeyCode(info.getKey()) + "\" " 448 + "keyChar=\"" + getKeyChar(info.getKey()) + "\" " 449 + "modifiers=\"0\" />" 450 ); 451 452 writeLine(writer, "</KeyEvent>"); 453 454 // TODO: keyevent structure part 455 } 456 457 private String getKeyChar (VirtualKey key) { 458 // TODO 459 return ""; 460 } 461 462 private int getKeyCode (VirtualKey key) { 463 // TODO 464 return -1; 465 } 415 466 } -
trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/guimodel/JFCGUIElement.java
r1683 r1691 162 162 // jacareto indices start at 1 163 163 int jacIndex = getIndex() + 1; 164 // some class specific hacks 164 165 // FIXME: some class specific hacks 165 166 if (name.equals("JFrame")) { 166 167 jacIndex++; … … 168 169 else if (name.equals("JLayeredPane")) { 169 170 jacIndex--; 171 } 172 else if (name.equals("JTextField")) { 173 jacIndex = 1; 170 174 } 171 175
Note: See TracChangeset
for help on using the changeset viewer.