Changeset 371 for trunk/JFCMonitor/src/de
- Timestamp:
- 01/30/12 14:07:12 (13 years ago)
- Location:
- trunk/JFCMonitor/src/de/ugoe/cs/eventbench/jfcmonitor
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JFCMonitor/src/de/ugoe/cs/eventbench/jfcmonitor/JFCListener.java
r370 r371 66 66 MouseEvent mouseEvent = (MouseEvent) event; 67 67 if (!isMouseMovement(event.getID())) { 68 builder.append("<event id=\"" + event.getID() + "\">" + StringTools.ENDLINE); 68 builder.append("<event id=\"" + event.getID() + "\">" 69 + StringTools.ENDLINE); 69 70 builder.append(" <param name=\"X\" value=\"" 70 71 + mouseEvent.getX() + "\" />" + StringTools.ENDLINE); … … 72 73 + mouseEvent.getY() + "\" />" + StringTools.ENDLINE); 73 74 builder.append(" <param name=\"Button\" value=\"" 74 + mouseEvent.getButton() + "\" />" + StringTools.ENDLINE); 75 + mouseEvent.getButton() + "\" />" 76 + StringTools.ENDLINE); 75 77 builder.append(" <param name=\"Modifiers\" value=\"" 76 + mouseEvent.getModifiers() + "\" />" + StringTools.ENDLINE); 78 + mouseEvent.getModifiers() + "\" />" 79 + StringTools.ENDLINE); 77 80 addSourceInfo(builder, event); 78 81 builder.append("</event>" + StringTools.ENDLINE); … … 81 84 if (event instanceof KeyEvent) { 82 85 KeyEvent keyEvent = (KeyEvent) event; 83 if (keyEvent.getID() == KeyEvent.KEY_TYPED) { 84 builder.append("<event id=\"" + event.getID() + "\">" + StringTools.ENDLINE); 86 if (keyEvent.getID() == KeyEvent.KEY_PRESSED 87 || keyEvent.getID() == KeyEvent.KEY_RELEASED) { 88 builder.append("<event id=\"" + event.getID() + "\">" 89 + StringTools.ENDLINE); 85 90 builder.append(" <param name=\"KeyCode\" value=\"" 86 91 + keyEvent.getKeyCode() + "\" />" + StringTools.ENDLINE); 87 92 builder.append(" <param name=\"Modifiers\" value=\"" 88 + keyEvent.getModifiers() + "\" />" + StringTools.ENDLINE); 93 + keyEvent.getModifiers() + "\" />" 94 + StringTools.ENDLINE); 89 95 addSourceInfo(builder, event); 90 96 builder.append("</event>" + StringTools.ENDLINE); … … 93 99 if (event instanceof FocusEvent) { 94 100 FocusEvent focusEvent = (FocusEvent) event; 95 if( focusEvent.getID() == FocusEvent.FOCUS_GAINED ) { 96 builder.append("<event id=\"" + event.getID() + "\">" + StringTools.ENDLINE); 101 if (focusEvent.getID() == FocusEvent.FOCUS_GAINED) { 102 builder.append("<event id=\"" + event.getID() + "\">" 103 + StringTools.ENDLINE); 97 104 addSourceInfo(builder, event); 98 105 builder.append("</event>" + StringTools.ENDLINE); -
trunk/JFCMonitor/src/de/ugoe/cs/eventbench/jfcmonitor/Runner.java
r370 r371 78 78 Toolkit.getDefaultToolkit().addAWTEventListener(listenerStdOut, 79 79 AWTEvent.MOUSE_EVENT_MASK); 80 Toolkit.getDefaultToolkit().addAWTEventListener(listenerStdOut, 81 FocusEvent.FOCUS_EVENT_MASK); 80 82 } catch (UnsupportedEncodingException e) { 81 83 System.err
Note: See TracChangeset
for help on using the changeset viewer.