Changeset 1714
- Timestamp:
- 09/02/14 15:46:57 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-plugin-jfc/src/main/java/de/ugoe/cs/autoquest/plugin/jfc/commands/CMDgenerateJacaretoReplay.java
r1713 r1714 46 46 47 47 public StructureNode(String type) { 48 content = "<StructureElement class=\"jacareto.struct." + type + "\">";48 setContent(type); 49 49 children = new ArrayList<StructureNode>(); 50 50 } … … 53 53 content = "<Recordable ref=\"" + (nextRef++) + "\" />"; 54 54 children = new ArrayList<StructureNode>(); 55 } 56 57 public void setContent(String type) { 58 content = "<StructureElement class=\"jacareto.struct." + type + "\">"; 55 59 } 56 60 … … 224 228 Event event = eventIter.next(); 225 229 230 System.out.println(event.getType()); 231 System.out.println(event.getTarget()); 232 System.out.println("---"); 233 226 234 if (event.getType() instanceof MouseButtonDown) { 227 235 lastKeySequenceEvent = null; 236 checkIfMouseDragged(); 228 237 229 238 lastMouseClickEvent = new StructureNode("MouseClick"); … … 255 264 256 265 lastFocusChangeEvent = null; 266 lastMouseClickEvent = null; 257 267 } 258 268 } … … 263 273 } 264 274 else if (event.getType() instanceof KeyPressed) { 275 checkIfMouseDragged(); 276 265 277 if (lastKeySequenceEvent == null) { 266 278 lastKeySequenceEvent = structure.add("KeySequence"); … … 270 282 } 271 283 else if (event.getType() instanceof KeyReleased) { 284 checkIfMouseDragged(); 285 272 286 writeKeyEvent(writer, event, 402); 273 287 } 274 288 } 289 } 290 } 291 292 private void checkIfMouseDragged() { 293 if (lastMouseClickEvent != null) { 294 // this was not really a click, just a drag 295 lastMouseClickEvent.setContent("MouseDrag"); 296 structure.children.add(lastMouseClickEvent); 297 lastMouseClickEvent = null; 275 298 } 276 299 }
Note: See TracChangeset
for help on using the changeset viewer.